this array is a product of a process which i push to this array and when i use nested foreach and echo it gives me all the values from it.
foreach ($arr as $key) {
foreach ($key as $keys => $values) {
echo $values;
}
My question is how can assign it in variable so that I can distinguish where it belongs
Array
(
[logs] => Array
(
[0] => 2014-09-22 01:24:56
[1] => 2014-09-22 10:53:35
[2] => 2014-09-22 07:49:45
[3] => 2014-09-22 06:49:29
)
[fullname] => Array
(
[0] => DORIS JOHNSON
[1] => JOHN DOE
[2] => JOHN DOE
[3] => JOHN DOE
)
[id] => Array
(
[0] => 785739
[1] => 404150
[2] => 404150
[3] => 404150
)
[misc] => Array
(
[0] => Etc
[1] => Other
[2] => Etc
[3] => Etc
)
[status] => Array
(
[0] => MARRIED
[1] => SINGLE
[2] => SINGLE
[3] => SINGLE
)
)
I need to make and use the keys as a variable like if i need to output it.
echo $logs;
echo $fullname;
echo $id;
echo $misc;
echo $status;
expected output:
2014-09-22 01:24:56 | DORIS JOHNSON | 785739 | Etc | MARRIED
2014-09-22 10:53:35 | JOHN DOE | 404150 | Other | SINGLE
and soon...