Page is a not externally linkable
Dinkar - 4:59 am on Dec 28, 2011 (gmt 0)
To abushahin:
I didn't studied your code but want to reply to the following quote -
...but for some reason the condition with && doesnt work and the else if one does.
Do you know what does your above quote means? It means you need to learn how "if else if" and logical "and" works.
Try this code:
$a = 1;
$b = 3;
if ($a == 0)
echo "A = Zero and B = Any\n";
else if ($b != 2)
echo "A = Any but not Zero and B = Any but not Two\n";
if (($a == 0) && ($b != 2))
echo "A = Zero and B = Any but not Two\n";
else
echo "A = Any, may be Zero and B = Any, may be 2\n";
Disclaimer: The above code is not tested. But play with it, you will learn.