Re: array of array
- From: Kim André Akerø <kimandre@xxxxxxxxxxxxxxxxxx>
- Date: 29 Sep 2005 09:23:46 GMT
Bob Bedford wrote:
> > $bigarray["X"][] = $value1;
> > $bigarray["X"][] = $value2;
> > ...
> > $bigarray["Y"][] = $value5;
> Does it create a new element in the $bigarray["X"] ?
> I mean then I have $bigarray["X"][0] == $value1;
> $bigarray["X"][1] == $value2;
Yes. As mentioned in Ewoud Dronkert's reply, this is a better way of
doing it rather than using array_push(). Even the PHP manual mentions
this.
$bigarray[] = $value1;
=>
$bigarray[0] == $value1;
$bigarray[0][] = $value2;
=>
$bigarray[0][0] == $value2;
--
Kim André Akerø
- kimandre@xxxxxxxxxxxxxxxxxx
(remove NOSPAM to contact me directly)
.
- References:
- array of array
- From: Bob Bedford
- Re: array of array
- From: Kim André Akerø
- Re: array of array
- From: Bob Bedford
- array of array
- Prev by Date: Re: array of array
- Next by Date: Re: SQL beginner question - JOIN / relational database.
- Previous by thread: Re: array of array
- Next by thread: Re: array of array
- Index(es):
Relevant Pages
|