display ['name'] inside of a foreach loop coming from another loop
<p>is it possible to use the indexes values inside of a foreach loop that is contained inside a partent for each. Look at the script below and observe that in the child for each I use <code>echo'&lt;div&gt;' .$product['name'] . '&lt;/div&gt;';</code> When <code>$product[' name '];</code>  belongs to the parent for each. is that possible? I am looking to use the index <code>['name ']</code> in the child <code>foreach()</code>.</p>

<pre><code>foreach($tree as $product){

    echo '&lt;div&gt;' . $product['name']. '&lt;/div&gt;';

    foreach($product['variery'] as $variety) 

    {
        echo'&lt;div&gt;'. $variery['image'] . '&lt;/div&gt;';
        echo'&lt;div&gt;' .$product['name'] . '&lt;/div&gt;';

    } // end of child for each

} //end of parent for each
</code></pre>
