Retreive sub-arrays in a multidimensional array. Need help.
Posted: Thu Aug 02, 2007 12:06 pm
Hi,
I am stuck with what it seems to me a simple problem and I need some help. I am very new php programmer ... I am pretty sure that you experts can give me the answer in few words..
Here it is :
I have a multidimensional array that looks like this :
As you can see, the indexes are a number : 2007, 2006, ... and each item of those keys contains an array with other items like a path and a number :
Now, if I know my index number (let say 2007) is there a way to retrieve the entire sub-array for that particular key so I can have in a array the values for the key I have choosed ?
I hope you could answer me.
Thanks
I am stuck with what it seems to me a simple problem and I need some help. I am very new php programmer ... I am pretty sure that you experts can give me the answer in few words..
Here it is :
I have a multidimensional array that looks like this :
Code: Select all
Array ( [2007] => Array ( [0] => Array ( [mois] => 7 [path] => /var/www/html/rapports/ARCHIVES/2007/7 ) [1] => Array ( [mois] => 6 [path] => /var/www/html/rapports/ARCHIVES/2007/6 ) ) [2006] => Array ( [0] => Array ( [mois] => 1 [path] => /var/www/html/rapports/ARCHIVES/2006/1 ) ) )Code: Select all
2007
0
path : /var/www/html/rapports/ARCHIVES/2007/
month : 7
1
path : /var/www/html/rapports/ARCHIVES/2007/
month : 6
2006
0
...I hope you could answer me.
Thanks