Mega Code Archive

 
Categories / Php / Statement
 

Using if to test for multiple values

<? $action = "ADD"; if ($action == "ADD") {     echo "Perform actions for adding."; } elseif ($action == "MODIFY") {     echo "Perform actions for modifying."; } elseif ($action == "DELETE") {     echo "Perform actions for deleting."; } ?>