note 33219 added to control-structures.while
| From: | destes at ix dot netcom dot com dot nospam | Date: | Thu, 19 Jun 2003 15:17:57 +0000 |
| Subject: | note 33219 added to control-structures.while | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-50651@lists.php.net to get a copy of this message | ||
Be very careful about the exact syntax of your condition clause. Specifically, if you're not
careful, you can easily get an infinite loop, and will wonder why the PHP page isn't loading.
For example:
while ($loop = TRUE) {
...
}
Instead of $loop == TRUE. This is a common mistake but it hurts more when it's in a structure
like a while().
----
Manual Page -- http://www.php.net/manual/en/control-structures.while.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33219
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33219&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33219&report=yes