Jump to content


GingerRobot

Member Since 04 Jun 2005
Offline Last Active Aug 23 2013 10:35 AM

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

Posted by GingerRobot on 26 July 2009 - 04: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.


Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com