note 33219 modified in control-structures.while by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 13:55:09 +0000 |
| Subject: | note 33219 modified in control-structures.while by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79795@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:
<?php
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().
--was--
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().
http://php.net/manual/en/control-structures.while.php