- strcasecmp: documentation ( source)
<?php
if(strcasecmp('string1', 'string1') == 0)
{
echo '
Strings match.1
';
} else {
echo '
Strings do not match.2
';
}
if(strcasecmp('string1', 'String1') == 0)
{
echo '
Strings match.3
';
} else {
echo '
Strings do not match.4
';
}
if(!strcasecmp('string1', 'STRING2'))
{
echo '
Strings match.5
';
} else {
echo '
Strings do not match.3
';
}