PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
benyboi
Forum Commoner
Posts: 80 Joined: Sat Feb 24, 2007 5:37 am
Post
by benyboi » Sat Mar 17, 2007 4:21 pm
is it possible to have OR's inside an IF statement?
Like:
Code: Select all
if($val1=$val2 or $val3=$val4 ...){...
thanks
Last edited by
benyboi on Sat Mar 17, 2007 4:48 pm, edited 1 time in total.
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sat Mar 17, 2007 5:15 pm
yea, but you are using assignment operators, not comparison operators.
= vs == and ===
Kieran Huggins
DevNet Master
Posts: 3635 Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:
Post
by Kieran Huggins » Sat Mar 17, 2007 6:10 pm
doh! nice catch jcart!
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Sat Mar 17, 2007 6:15 pm
Kieran Huggins wrote: doh! nice catch jcart!
It's ok, not every human being has been surgically given eagle eyes.