Comparing strings in the / case chain is case sensitive.
<?php $smart = "crikey"; switch ($smart) { case "Crikey": echo "Crikey"; break; case "Hund": echo "Hund"; break; case "Kat": echo "Kat"; break; default: echo "Alt Andet"; } ?>
โAlt Andetโ prints above the code, but I would like to compare case-insensitive strings and print โCrikeyโ. How can i do this?
source share