Skip to content

Instantly share code, notes, and snippets.

@marceloxp
Last active December 18, 2015 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marceloxp/5754018 to your computer and use it in GitHub Desktop.
Save marceloxp/5754018 to your computer and use it in GitHub Desktop.
switch case
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 "i is not equal to 0, 1 or 2";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment