the code below causes a timeout
function returnStatus(){ for($i=0;$i<=100;$i+5){ $s[$i]="%".$i; } return $s; }
anybody has any idea?
It is an infinite loop, since $i always remains at 0
The correct code would probably be:
function returnStatus() { $s = array(); //just to make this fact clear for ($i = 0; $i <= 100; $i += 5) { $s[$i] = "%" . $i; } return $s; }