if(($var && $var < $othervar) || (statement like first) || ( other statement))

From: Date: Thu, 15 Jun 2000 18:13:16 +0000
Subject: if(($var && $var < $othervar) || (statement like first) || ( other statement))
Groups: php.general 
Request: Send a blank email to php-general+get-1987@lists.php.net to get a copy of this message
Forgive me but I searched the manuals and evidently I am so far off I don't know where to look. The script which is the subject of the questions to follow: if (($clients[$i]["views"] && $clients[$i]["views"] < $clients[$i]["views_used"]) || ($clients[$i]["clicks"] && $clients[$i]["clicks"] < $clients[$i]["clicks_used"]) || (isset($clients[$i]["days"]) && $clients[$i]["days"] < 0)) { do whatever Q. 1. I know what the && is for from the maual. both $a and $b are true result is true. But what does if ($a && $a) do. It must be different because this script I am trying to find a problem with absolutely will do nothing without it. 2. Is the pipe " || " an or, and, continue, or what? This script is from mail.php3, a part of phpads. Almost everything with the program is great but the way this statement evaluates seems to be flawed. I have inserted tons of hooks to print out the relevent variables along the way and a set of values which should seem to evaluate to true do not. So I must be misunderstanding something above. Please someone help. I have been looking at this for 2 days and although I know a lot more I am no closer to solving it. -- -Lewis Bergman- Texas Communications 915-695-6962 4309 Maple St. Abilene, TX 79602

« previous php.general (#1987) next »