LB1234
asked on
Have i created an infinite loop in this short PHP code? Browser just locks up
The goal is to count to 1000 by 50, and to skip 550 while numbers are being echoed to browser. What am i doing wrong? Thanks!
<?php
$distance = 50;
while ($distance < 1000) {
echo $distance . "<br>";
if ($distance == 550) {
continue;
}
$distance += 50;
}
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try:
Open in new window
Cd&