String comparison in PHP (Capital Letter VS Small Letter)
<?php
if('cat' == 'Cat')
{
echo 1;
}
else if('cat' > 'Cat')
{
echo 2;
}
else
{
echo 3;
}
// outputs 2
# (a to z) is bigger than (A to Z)
?>
if('cat' == 'Cat')
{
echo 1;
}
else if('cat' > 'Cat')
{
echo 2;
}
else
{
echo 3;
}
// outputs 2
# (a to z) is bigger than (A to Z)
?>
Comments
Post a Comment