Re: array awry
| From: | CC Zona | Date: | Tue, 27 Feb 2001 08:42:34 +0000 |
| Subject: | Re: array awry | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6974@lists.php.net to get a copy of this message | ||
In article <061201c0a063$08eab5a0$53daead8@gilanet.com>,
larentium@gilanet.com ("Keith Spiller") wrote:
> This associative array embedded within a function and declared as a global at
> the start of the function, is meant to be a multidimensional array, but with
> every loop of the while ($myrow = mysql fetch row($result)) statement, it's
> previous values are replaced by the new ones. Any ideas on how I can fix
> this?
>
> If ($Selection == "3")
> {
> $tabledata[catid] = $myrow[0];
> $tabledata[category] = "$myrow[1]";
> $tabledata[under] = $myrow[2];
> $tabledata[corder] = $myrow[3];
> $tabledata[active] = $myrow[4];
> }
So what you're saying is that want indexes 'catid', 'category', etc. to
have a distinct value for each row pulled from the database? Then you need
to add another dimension to that array.
--
CC