i have an array which is in the following format
Array ( [0] => Array ( [id] => 13 [path] => Array ( [0] => Array ( [name] => Pistachios [path] => E_906.JPG ) ) ) [1] => Array ( [id] => 14 [path] => Array ( [0] => Array ( [name] => Almonds [path] => almond.jpg ) ) ) )
now what i need is i need the id ,name and path values from this array it basically has two indexes 0 and 1 i am using foreach loop for this purpose
here's my code
<?php
foreach ($child3 as $key => $value){
echo $key;
}
?>
when is echoing out the key it prints correct 0,1 but when i try to echo the value like
<?php
foreach ($child3 as $key => $value){
echo $value;
}
?>
it is giving me an error of Array to string conversion any recommendations?