Please put your code in [CODE] and [CODE] tags in the future, on any forum.
for ($i = $l; $h; $i++)
This loop will terminate when the middle expression evaluates to a false value. You seem to want $i <= $h, not $h. ($h will just return something like 2 or 3 (whatever its value is), every time, and those are true values, causing the loop to run infinitely.)
Rashakil Fol
Super Senior Demiposter
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177