- strcasecmp: documentation ( source)
<?php
if(strcasecmp('string1', 'string1') == 0)
{
echo '
Strings match.
';
} else {
echo '
Strings do not match.
';
}
if(strcasecmp('string1', 'String1') == 0)
{
echo '
Strings match.
';
} else {
echo '
Strings do not match.
';
}
if(strcasecmp('string1', 'STRING1') == 0)
{
echo '
Strings match.
';
} else {
echo '
Strings do not match.
';
}