Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Of course it's possible.
Your problem is surely that you don't do a test in your if, but an assignation.
Remember:
1 = means an assigantion
2 = means a comparison, with casting between different types
PHP Code:
1==3 //return false 1=='1' //return true 'a'=='A' /return false 4!=true //return true
3 = mean a comparison, but without type casting
PHP Code:
1==='1' //false 'a'==='a' //true 1!=='1' //true
So, in your test, try to put 2 = in your if statements
PHP Code:
if ($a == $b){ $c = 0; } else { $c = 1; }
</span></span>
__________________
Only a biker knows why a dog sticks his head out the window.
|