I am trying to loop through an array with duplicate indexes. But it only prints 3 times not all of them. I want to print all values in the array is that possible?
Here is my PHP code:
$data['Video'][0]['name']='a';
$data['Video'][1]['name']='b';
$data['Video'][1]['name']='c';
$data['Video'][3]['name']='d';
$data['Video'][3]['name']='e';
foreach ($data['Video'] as $video) {
print_r($video);
}
And here is the output of that code:
Array
(
[name] => a
)
Array
(
[name] => c
)
Array
(
[name] => e
)