Basic PHP concept/syntax -
i'm new php , below 1 of first codes have tried, understanding basic concept , syntax. i'm running code using xampp server.
<?php $var=1; while($var<10){ if($var==2) continue; echo "$var <br>"; $var++; } ?>
i'm getting following error :-
1
fatal error: maximum execution time of 30 seconds exceeded in c:\xampp\htdocs\day\breakdemo.php on line 4
why throw error ?
because, when $var
2
, say, continue
, , move next iteration, time, infinite loop, , $var
never incrase again.
Comments
Post a Comment