String Match

Submitted by:Jhon Smith

Date added:16 March, 2011

Category:PHP

This checks to see if two strings match each other.

Tags: php string , php match

Code Snippet:

<?php
function strcomp($str1,$str2){
if($str1 == $str2){
return TRUE;
}else{
return FALSE;
}
}

echo strcomp("First string","Second string"); //Returns FALSE
echo strcomp("A string","A string"); //Returns TRUE
?>
 
 

Comments