simple "while" loop terminated for no reason
| From: | Raymond | Date: | Sun, 25 May 2003 21:12:14 +0000 |
| Subject: | simple "while" loop terminated for no reason | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-148929@lists.php.net to get a copy of this message | ||
hi, i'm using php ver 4.3.1 in winXP o/s.
my html output always halted halfway from execution. i find out
that it has got to do with the while loop.
for simplicity, i created a test php file that will execute a loop for
1000 times and print out some strings. however, even before it
reach 1000, it stops. there is no error given.
========================
the php file as below:
<html>
<head><title>test</title></head>
<body>
<?php
$count = 0;
while ($count < 1000) {
print ++$count . ", field01, field02, field03, field04, field05,
field06, field07, field08, field09<br>\n";
}
?>
</body>
</html>
========================
the html result generated as below:
<html>
<head><title>test</title></head>
<body>
1, field01, field02, field03, field04, field05, field06, field07, field08,
field09<br>
2, field01, field02, field03, field04, field05, field06, field07, field08,
field09<br>
3, field01, field02, field03, field04, field05, field06, field07, field08,
field09<br>
4, field01, field02, field03, field04, field05, field06, field07, field08,
field09<br>
:
:
:
933, field01, field02, field03, field04, field05, field06, field07, field08,
field09<br>
Note:: it ends here. no error displayed.
========================
all kind advices are appreciated. thanks in advance.
regards,
raymond