PHP Switch Example

Here’s php switch example

<?
// switch example using integers
$option=4;
switch ($option) {
    case 1:
        echo “a good monkey sees no evil”;
        break;
    case 2:
        echo “a good monkey speaks no evil”;
        break;
    case 3:
        echo “a good monkey hears no evil”;
        break;
    case 4:
        echo “a good monkey does no evil”;
        break;
}
?>

Leave a Reply

Your email address will not be published. Required fields are marked *