Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Switch Statement in PHP

Switch Statement In PHP
$var=3; // Assings 1 to variable var
switch($var)// Switch statement that takes an argument
{
case 1:      // If the value of var is 1
echo " This is 1"; // this statement will be executed
break;     
                     
case 2:      // If the value of var is 2
echo " This is 2"; // this statement will be executed
break;
case 3:      // If the value of var is 3
echo " This is 3"; // this statement will be executed
break;
}
_____________________________________________________________
For output and program execution see the video
                                                            


This post first appeared on INTERNET MARKETING AND BLOGGING, please read the originial post: here

Share the post

Switch Statement in PHP

×

Subscribe to Internet Marketing And Blogging

Get updates delivered right to your inbox!

Thank you for your subscription

×