undefined offset help

Posted on 16th Feb 2014 by admin

Hi All,

I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = array();
$i=0;
while($row = mysql_fetch_array($result))
{
$va[$i] = $row['id'];
$i++;
}
It gives undefined offset at this line $++

thanks

Other forums