Jump to content


Member Since 04 Jun 2005
Offline Last Active Nov 13 2014 02:35 PM

#883130 [SOLVED] Missing "1st Value" in Array

Posted by GingerRobot on 26 July 2009 - 09:57 AM

You need to remove this line:

$row = mysql_fetch_array($result) or die(mysql_error());

As the manual page says, the function returns the next row in the result set and advances the internal pointer. So before your loop runs, you're already pointing at the second row in the result set.

Edit: I shall move this topic to the FAQ/Code snippet repository once you've seen it and marked it solved. It's a fairly frequent question -- i guessed the question and answer from your title.