Having trouble with array manipulation, my array
[time] => Array
(
[0] => Array
(
[total_time] => 02:10:00
)
[1] => Array
(
[total_time] => 01:05:00
)
[2] => Array
(
[total_time] => 00:50:00
)
)
I wish to get
$total_time = ('02:10:00', '01:05:00', '00:50:00');
I have try with foreach
foreach ($data['time'] as $key) {
array_push($total_time, $key['total_time']);
}
But my output is:
print_r($total_time) = 3
Is there any way to get this
$total_time = ('02:10:00', '01:05:00', '00:50:00');