Re: array of array
- From: Kim André Akerø <kimandre@xxxxxxxxxxxxxxxxxx>
- Date: 29 Sep 2005 09:07:18 GMT
Bob Bedford wrote:
> I've to save in an array of array some values.
>
> Problem: I don't know the size of the array before filling it.
>
> I'd like something like
>
> $bigarray = array():
>
> then runnig the code I must create dinamically (I don't know how
> many) few arrays in the bigarray; $bigarray["X"] = array():
> $bigarray["Y"] = array():
>
> then fill those arrays with few unknow number of values.
> array_push($bigarray["X"],$value1);
> array_push($bigarray["X"],$value2);
>
> array_push($bigarray["Y"],$value5);
> ...
> but array_push doesn't manage it.
>
> How to do so ?
$bigarray["X"][] = $value1;
$bigarray["X"][] = $value2;
....
$bigarray["Y"][] = $value5;
--
Kim André Akerø
- kimandre@xxxxxxxxxxxxxxxxxx
(remove NOSPAM to contact me directly)
.
- Follow-Ups:
- Re: array of array
- From: Bob Bedford
- Re: array of array
- References:
- array of array
- From: Bob Bedford
- array of array
- Prev by Date: SQL beginner question - JOIN / relational database.
- Next by Date: Re: array of array
- Previous by thread: array of array
- Next by thread: Re: array of array
- Index(es):
Relevant Pages
|