I have a multidimensional array as shown below that I am wanting to simply get the value of [caption] which is in the [image_meta] array at the bottom.
Array
(
[file] => 2014/01/dreamstimecomp_5449062.jpg
[sizes] => Array
(
[thumbnail] => Array
(
[file] => dreamstimecomp_5449062-150x150.jpg
)
[medium] => Array
(
[file] => dreamstimecomp_5449062-300x224.jpg
)
)
[image_meta] => Array
(
[aperture] => 0
[credit] =>
[camera] =>
[caption] =>
[created_timestamp] => 0
[copyright] =>
[focal_length] => 0
[iso] => 0
[shutter_speed] => 0
[title] =>
)
)
I've tried this for each loop below but not working
echo '<pre>';
print_r($caption_data);
echo '</pre>';
foreach ($caption_data as $x=>$x_value){
echo $x[0][3];
}
var_dump($x);And usevar_dumpevery time you have no idea what's in a variable