Page 1 of 1

How are 'and' and && different?

Posted: Fri Nov 24, 2006 5:55 pm
by SmokyBarnable
What exactly is the difference between 'and' and '&&'?

Thanks.

Posted: Fri Nov 24, 2006 6:27 pm
by brendandonhue
They have different precedence in the order of operations.

Posted: Sat Nov 25, 2006 1:07 am
by dibyendrah
They both are logical operators and are same. Just like "OR" and "||" are same.

Posted: Sat Nov 25, 2006 5:18 am
by jmut
and the winner is....... " brendandonhueeeeee" :)

Posted: Sat Nov 25, 2006 6:41 am
by Oren
They are not the same:
brendandonhue wrote:They have different precedence in the order of operations.

Posted: Sat Nov 25, 2006 11:00 am
by dibyendrah
What is the difference then ? I didn't find any difference.
Oren wrote:They are not the same:
brendandonhue wrote:They have different precedence in the order of operations.

Posted: Sat Nov 25, 2006 11:09 am
by JayBird
dibyendrah wrote:What is the difference then ? I didn't find any difference.
Oren wrote:They are not the same:
brendandonhue wrote:They have different precedence in the order of operations.
Read this for an explanation of Operator Precedence

http://uk2.php.net/manual/en/language.o ... precedence

Posted: Sat Nov 25, 2006 11:18 am
by dibyendrah
okay, both are logical operators but having difference precedence only.