<?php
for($i=0;$i<5;$i ){
$a = $i;
}
echo $a;
?>
The browser has printed out 6, but why is the error reported above?
It is not defined the first time through the loop. The second time, $a has a value, so of course the result can be output.
It is not defined the first time through the loop. The second time, $a has a value, so of course the result can be output.