Re: How to print last row in an array using WHILE?

From: Date: Tue, 27 Mar 2001 06:34:29 +0000
Subject: Re: How to print last row in an array using WHILE?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7857@lists.php.net to get a copy of this message
On Mon, Mar 26, 2001 at 10:35:37PM -0800, Bob Stone wrote: > Everything works fine except that only n-1 rows from > the array will display. no wonder (explained below at the code) This fetches the first row.... > $myrow = mysql_fetch_array($result); ..and then the rest in the while-loop. You need to take out the first '$myrow = mysql_fetch_array($result);' > while ($myrow = mysql_fetch_array($result)) { > > } should work then. -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet |

« previous php.db (#7857) next »