note 55773 added to language.types.boolean
| From: | Matan at osu1 dot php dot net | Date: | Fri, 12 Aug 2005 18:28:48 +0000 |
| Subject: | note 55773 added to language.types.boolean | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-93518@lists.php.net to get a copy of this message | ||
wachout of tring to loop booleans:
for instance:
<?php
$ok = TRUE;
foreach($booleanarray as $val){ //let's say that $booleanarray has TRUE and FALSE cells only.
$ok = $ok AND $val;
}
return $ok;
?>
that little code above supposibly checks if all cells are TRUE. after cracking my head for quite a
while i found out it doens't realy work ('ok' will stay TRUE no matter what)
So unless i some how fucked up with the syntex this should be fix and untill then use another
method.
matan.
----
Manual Page -- http://www.php.net/manual/en/language.types.boolean.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55773
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55773&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55773&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55773&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55773&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55773&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55773&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55773&report=yes
Search -- http://master.php.net/manage/user-notes.php