Re: Oh why won't it work

From: Date: Mon, 27 Oct 2003 15:15:21 +0000
Subject: Re: Oh why won't it work
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167729@lists.php.net to get a copy of this message
On Mon, 27 Oct 2003 13:00:19 -0000, you wrote: $n is created /outside/ the function. > $n = 1; So you can't use it here. It's not in scope. > $array[$n][$colname] = $value; >But when I run this script, it looses the first row and doesn't really That's because you get the first row here. > $row=mysql_fetch_array($result,MYSQL_ASSOC); And immediately throw it away as you enter the loop. > while ($row=mysql_fetch_array($result,MYSQL_ASSOC)) I answered thia (and fixed your code) last time you posted.

« previous php.general (#167729) next »