I have been dealing with such arrays before and never faced any problem but this time i do not know why it is freaking me out. I am not able to parse the array below.
'medias' => array
(
0 => ''
1 => array
(
'filename' => '1140_image.png'
'path' => 'path/of/file/here'
'width' => '1140'
'height' => '480'
)
2 => array
(
'filename' => '1140jpg.jpg'
'path' => 'path/of/file/here'
'width' => '1140'
'height' => '713'
)
)
In order to parse it, this is what i am doing
foreach($componentModelMedias['medias'] as $componentModelMedia){
echo $componentModelMedia['path'];
}
And it is not showing me any data in return. I am not sure why it is happening and i also know it is not worth asking this question here but tell me if i am doing any thing wrong.