Re: array problems
| From: | Richard Lynch | Date: | Wed, 16 Aug 2006 21:00:16 +0000 |
| Subject: | Re: array problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-240785@lists.php.net to get a copy of this message | ||
On Wed, August 16, 2006 1:08 am, Chris G wrote:
> while($line = mysql_fetch_array($result)) {
>
> $data1y[] = $line['rep_value_perc'];
$dataly[][] = $line['rep_value_prec'];
>
> }
>
> This gives me just the one array from the above example, $datay1. How
> would
>
> you dynamically create the all of the above arrays?
>
> At present the $_GET[per_id] is only one value $_GET[per_id] = 2
>
> What happens when it becomes more than one, like $_GET[per_id] = array
>
> (1,2,34,4,561,334)
Then you either need to run multiple queries to add to your array of
arrays, or you need to run one query with an ORDER BY the _GET[per_id]
field and then you can build a new sub-array for each new per_id in
your results.
--
Like Music?
http://l-i-e.com/artists.htm