Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php switch case default

<?php
// switch statement:

switch ($i) {
    case 0:
        echo "i equals 0";
        break;
    case 1:
        echo "i equals 1";
        break;
    case 2:
        echo "i equals 2";
        break;
    default:
   	echo "default message";
}
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #switch #case #default
ADD COMMENT
Topic
Name
6+7 =