Using PHP I am try to echo out the first item from an array...
Array
(
[docs] => Array
(
[0] => Array
(
[imgurl] => http://www.example.com/image1.jpg
)
[1] => Array
(
[imgurl] => http://www.example.com/image2.jpg
)
[2] => Array
(
[imgurl] => http://www.example.com/image3.jpg
)
[3] => Array
(
[imgurl] => http://www.example.com/image4.jpg
)
)
)
I am using the following PHP to attempt to display the first item...
echo $array['docs'][0]['imgurl'];
But it is giving me the error...
Warning: Illegal string offset 'docs'
Can anyone show me what I am doing wrong?