Posted by Kim Andrι Akerψ on 09/29/05 12:23
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@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|