[ACCEPTED]-PHP: Breaks in default case switches?-break
Accepted answer
There's no reason its required so long as 3 the default is at the end of the switch 2 statement. Note that the default doesn't 1 need to be the last case: http://codepad.viper-7.com/BISiiD
<?php
$var = 4;
switch($var)
{
default:
echo "default";
break;
case 4:
echo "this will be executed";
break;
}
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.