Re: more values in a array
| From: | Jason Wong | Date: | Sun, 05 Jan 2003 05:49:38 +0000 |
| Subject: | Re: more values in a array | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-24561@lists.php.net to get a copy of this message | ||
On Sunday 05 January 2003 11:18, Martin Allan Jensen wrote:
> Hi everybody,
>
> I'm about to transport data from a function to a page that calls it, but
> i'm HAD to make the data's in one or more array's.....
>
> How can i possibly put all these datas in an array ?? And is it possible ??
>
> id value year type
> --+-------+-----+-----+
> 1 100 2002 P
> 2 200 2002 A
> 3 300 2002 P
> 4 400 2002 A
$myarray[1][value] = 100;
$myarray[1][year] = 2002;
$myarray[1][type] = 'P';
etc. OR
$myarray[1] = array('value' => 100, 'year' => 2002, 'type' =>
'P');
etc.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Life is like a tin of sardines. We're, all of us, looking for the key.
-- Beyond the Fringe
*/