I have the following associative array:
<? $group_array;
Which outputs the following:
Array
(
[user_id] => Array
(
[0] => 594
[1] => 597
)
[user_first] => Array
(
[0] => John
[1] => Jane
)
[user_last] => Array
(
[0] => Smith
[1] => Jones
)
)
My question is: How can I iterate through the array and output the specific values by it's name?
For instance, something like:
<?php
foreach ($group_array as $key => $value) {
print($key['user_id']);
print($key['user_first']);
// etc...
}
But this doesn't appear to work. Any help on this would be great. Thanks!