Learning PHP and MySQL

Example 03-17 Using strcmp to compare two stings

<?php

$name1  
=  "Bill";
$name2  =  "BILL";

$result  =  strcasecmp($name1,  $name2);

if  (!
$result){
echo  "They  match.";
}

?>

Returns:

They match.

Posted by on 07/19 at 03:49 PM

Next entry: Example 03-18 Concatenating strings together

Previous entry: Example 03-16 Correct escaping of special characters

<< Back to main