Why is this causing my server to run out of memory?
Posted: Fri Sep 24, 2004 11:22 am
The following code should not have any effect at all, but it causes my PHP server to run out of allocated RAM. If you echo the output to a screen it appears to be adding new $data[] array elements until it crashes. Am I doing something completely stupid or is this a bug?
Code: Select all
$res = mysql_query("select * from table limit 0,10");
while ($data = mysql_fetch_array($res))
{ for ($i=0;$i<count($data);$i++) { $dataї$i] = $dataї$i]; } }