note 39369 rejected from control-structures by didou
| From: | didou@php.net | Date: | Mon, 26 Jan 2004 09:13:19 +0000 |
| Subject: | note 39369 rejected from control-structures by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64195@lists.php.net to get a copy of this message | ||
Note Submitter: iges.seem@mail.ee
----
Hi,
running php 4.3.4 and perhaps discovered something (hopefully not my stupidity ;))
why is that this works...
if (($addbtn = isset($flds[$i]["addbtn"]))) {
if ($addbtn) {
// some action
}
}
but this does not....
if (($addbtn = isset($flds[$i]["addbtn"])) || ($editbtn =
isset($flds[$i]["editbtn"]))) {
if ($addbtn) {
// actions here a processed correctly
}
if ($editbtn) {
// actions here are ignored, although, if evaluteing the above
// editbtn condition separetly its true so this here should also
// be processed
}
}
QUESTION: why ist the second expression after the || (or) not evalueted?