Unexpected results when echoing the $value of a foreach loop
<p>I've written the following code:</p>

<pre><code>$hierachy = new hierachy;
$iterator = $hierachy-&gt;singlePathroot($name1);

try {
    print_r($iterator);

    foreach($iterator as $key=&gt;$value) {
        echo $value;
        echo $value['0'];
    }
}
</code></pre>

<p>The result of the <code>print_r</code> is…</p>

<pre><code>Array ( [0] =&gt; Array ( [name] =&gt; Fruit ) [1] =&gt; Array ( [name] =&gt; Red ) )
</code></pre>

<p>…but below that, the echo statements produce <code>ArrayArray</code>.</p>

<p>How can I echo the same values I see in the <code>print_r</code> output?</p>
