<?php
//string_strcmp.php
$str1 = 'one two';
$str2 = 'two three';
$str3 = 'one';
$str4 = 'one';
$compare1 = strcmp($str1, str2);
$compare2 = strcmp($str2, str1);
$same = strcmp($str4, $str3);
?>
<html>
<title> string_strcmp.php</title>
<body bgcolor="#E7F2F5" text="#000080">
Returns < 0 if str1 is less than str2;
<br> Returns > 0 if str1 is greater than str2, and
<br> Returns 0 if they are equal.
<?php
echo "<br/>first string < second string =$compare1";
echo "<br/>second string is > first =$compare2<br/>";
if($str3==$str4){ echo "matched : "; }
echo $same;
?>
</body>
</html>