Compare two strings (case-insensitive): in PHP
Description
The following code shows how to compare two strings (case-insensitive):.
Example
//from ww w. j a va2s . c o m
<?php
echo strcasecmp("Hello world!","HELLO WORLD!");
echo "<br>";
echo strcasecmp("Hello","HELLO");
echo "<br>";
echo strcasecmp("Hello","hELLo");
?>
The code above generates the following result.