Hi all,
I've been puzzling for two days on this problem and all that's related to it and despite the wealth of similar examples I just can not manage to find a satisfactory solution to my problem.
Situation: I have a not overly complicated multidimensional array:
[$array] => array
(
[0] => array
(
[key1] =>63
[key2] =>19
[key3] =>text
[key4] =>19/28/122
[...........
)
[1] => array
(
[key1] =>34
[key2] =>19
[key3] =>text
[key4] =>19/28/122
[...........
)
[2] => array
[key1] =>31
[key2] =>19
[key3] =>text
[key4] =>19/28/122
[...........
)
[3] => array
(
[key1] => 38
[...........
Which is bigger in real life but this suffices to explain.
I have a piece of php code that processes a simple, one-dimensional array value by value on a 'foreach' basis. This simple array consists of the key1 values of all $array[]['key1'] rows in the multidimensional array above. This array could be simulated in this case by: $array = array (63,34,31,38,.......)
And that is all I need! Extraction of the key1 values into an array so I can process them through a 'foreach' loop.
I have tried all 'foreach' and 'list' functions and combinations of them, I just can't get past displaying all of the subarray in my output, meaning all keys per subarray instead of only the key1 values in an array.
I really need a push in the right direction...
Thanks in advance!