IRC guru |
|
switch (TRUE){
case ($v_BAL <= 0): //less then 0 , -0
echo $v_BAL;
break;
case ($v_BAL <= 10 AND $v_BAL >= 1): //less then 10 and greater then 1
echo $v_BAL;
break;
default: //default
echo $v_BAL;
break;
}
switch (TRUE){ case ($v_BAL <= 0): //less then 0 , -0 break; case ($v_BAL <= 10 AND $v_BAL >= 1): //less then 10 and greater then 1 break; default: //default break; }
Voorbeeldje van op php.net (check de comments bij de functie switch) |