switch
switch ($type){
case “food”:
//delete
break;
case “food”:
//delete
break;
default:
//code to be executed if expression is different from both label1 and label2;
}
Mark Hambley Web Design & Development
switch ($type){
case “food”:
//delete
break;
case “food”:
//delete
break;
default:
//code to be executed if expression is different from both label1 and label2;
}
echo ($name==”Some Name”) ? “Name Matches!” : “Name Doesn’t Match”
//You can also do more complex and inline:
$text = “There “. ($total==1 ? “is 1 item” : “are “.($total == 0 ? “no items” : “$total items”) );