note 4816 deleted from Control Structures by ronabop

From: Date: Sat, 12 Aug 2000 20:56:10 +0000
Subject: note 4816 deleted from Control Structures by ronabop
Groups: php.notes 
Request: Send a blank email to php-notes+get-1541@lists.php.net to get a copy of this message
<P>As far as checking two things: I haven't figured it out, yet, or even if it's possible. <P> For example: (run command if either are true) <PRE> if ($a=1) or ($b=1) {command;} </PRE> <P>No can do. <P> But, try this: <PRE> if ($a = 1) { $b=1; } </pre> <P> THEN run the second command: <PRE> if ($b=1) {command;} </PRE> <P>It's the same effect, as if $a is true, you want it to run no matter what b is, and adds just 1 line to your coding. If the values are important elsewhere, then add a temporary variable. ;) <P>-Ben <BR> "Life is short. Live it!"

« previous php.notes (#1541) next »