Currently, my code just checks to see if a passed variable has a value. If it is then it sets kid to that variable. If not it sets it to xxx.
<? if (isset($_GET['kid'])) {
$kid = $_GET['kid'];
} else {
$kid="";
}
?>
I want to modify this so that if kid has a value, it then checks kid to see if it contains certain strings.
e.g.
if kid equals "dog" then kid="dog food"
if kid contains "cat" then kid="cat toy"
if kid equals "fish" then kid="fish"
I can see this might involve a case select but not sure how to structure it or check for the variable.
Any ideas?
Thanks,
Jon