Forum Moderators: coopster

Message Too Old, No Replies

If statement

Does it make sense?

         

ahmedtheking

8:47 am on May 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does this make sense?

if (($cmd) && (($compliance) ¦¦ ($sessioninfo))) { ...

killroy

9:27 am on May 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you remove the extra braces it'll be much easier to read:

if($cmd && ($compliance ¦¦ $sessioninfo)){ ...

Which is ssyntactically correct. If it's logically correct only you can know.

ahmedtheking

9:39 am on May 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, to me, it's logically corrent, but I couldn't get php to execute something like:

if this exists AND ( if this OR this exist ) , do this...

in the end i had to do it as:

if (this) {
if (this OR this) { ...