I know how to perform a normal foreach loop but I can't seem to work it for an array returned by the vafpress framework. I am using var_dump(vp_metabox('vp_meta_sample_2.binding_group')); which is generating the below mentioned array. How can I loop through all the images!
(1) { [0]=> array(4) { ["name"]=> string(1) "1" ["url"]=> string(10) "234234.com" ["image"]=> string(62) "http://localhost/wp/wp-content/uploads/2014/02/bottomright.jpg" ["shortcode"]=> string(108) "[shortcode name="1" url="234234.com" image="http://localhost/wp/wp-content/uploads/2014/02/bottomright.jpg"]" } }
I am using the following loop to get the values
$age=print_r (vp_metabox('vp_meta_sample_2.binding_group'));
print_r ($age);
foreach($age as $x=>$x_value)
{
echo "Key=" . $x . ", Value=" . $x_value;
echo "<br>";
}