Here's a small snippet of PHP code:
Code: Select all
$var1 = 0;
$var2 = 5;
switch($var1)
{
case ($var1 >= $var2):
echo 'case1';
break;
case 5:
echo 'case2';
break;
default:
echo 'default';
break;
}i allways thought that it should return "default". It does so if $var1 is one or two or something like that but not with zero..
Thanks for your ideas!