Hi all
i'm trying to activate a script on a condition using switch; my problem is that if the case has 2 values which if the both are true it does not work:
now if i try to send an ID of 1 the answer is 1
if i try 2 or 3 the anser is 2 or 3
but if i try 4 or 5 then the answer is still 2 or 3
i'm assuming that its not reconising the condition correctly!
How can i correct this? i've somewhere read that this does not work on a Windows 2000 OS, Apache is it true?
Thanks
Ncik
i'm trying to activate a script on a condition using switch; my problem is that if the case has 2 values which if the both are true it does not work:
Code:
switch ($ID)
{
case 1:
echo "1";
break;
case (2 || 3):
echo "2 or 3";
break;
case (4 || 5):
echo "4 or 5";
break;
}
now if i try to send an ID of 1 the answer is 1
if i try 2 or 3 the anser is 2 or 3
but if i try 4 or 5 then the answer is still 2 or 3
i'm assuming that its not reconising the condition correctly!
How can i correct this? i've somewhere read that this does not work on a Windows 2000 OS, Apache is it true?
Thanks
Ncik