Associate
- Joined
- 18 Oct 2002
- Posts
- 710
- Location
- Somerset
I have being doing some work in php and have several arrays created that i now want group together inside another array,
I have read over several tutorials and articles on multidimensional arrays but i am not getting very far with it.
lets say i have 3 arrays
$array1
$array2
$array3
each of these arrays has 10 keys numbered 100, 90, 80 etc etc (they hold percentage details so that was a easy numbering system to use)
now i have these 3 arrays i want to group them into
$arrygroup
Can this be done after the first 3 are created and populated, or will it have to be done at the start and i need to alter everything else to point to the array in an array?
and will i get
$arraygroup[1] pointing to and returning the array $array1 etc etc.
If so how do i then 'get to' $array1[80] from inside $arraygroup ?
Is it anything like $arraygroup[1[80]] or am i waaaaay of the mark?
Thanks
I have read over several tutorials and articles on multidimensional arrays but i am not getting very far with it.
lets say i have 3 arrays
$array1
$array2
$array3
each of these arrays has 10 keys numbered 100, 90, 80 etc etc (they hold percentage details so that was a easy numbering system to use)
now i have these 3 arrays i want to group them into
$arrygroup
Can this be done after the first 3 are created and populated, or will it have to be done at the start and i need to alter everything else to point to the array in an array?
and will i get
$arraygroup[1] pointing to and returning the array $array1 etc etc.
If so how do i then 'get to' $array1[80] from inside $arraygroup ?
Is it anything like $arraygroup[1[80]] or am i waaaaay of the mark?
Thanks