atitthaker Posted August 8, 2006 Share Posted August 8, 2006 I know the diff that AND is loosely bound and && is tightly bound but what is the working diff of the same??? If poss plz give example... Quote Link to comment Share on other sites More sharing options...
zq29 Posted August 8, 2006 Share Posted August 8, 2006 Its all to do with precedence, [b]&&[/b] and [b]||[/b] have a higher precedence than [b]AND[/b] and [b]OR[/b]. I see it like this...[code]<?php$a && $b OR $c; //Would be equal to ($a && $b) || $c;$a AND $b || $c; //Would be equal to $a && ($b || $c);$a && $b || $c; //Would be equal to ($a && $b) || $c;?>[/code]I think it's easier just to use parenthesise... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.