Illegal offset type error when => value is omitted
<p>Line 3 of the code below fails if I omit the <code>=&gt; $v</code> portion. I get the following error:</p>

<p><code>Warning: Illegal offset type in /home/site/page.php on line 404</code></p>

<p>When the <code>[$k]</code> in line 5 is changed to <code>['$k']</code>, i receive the following error. </p>

<p><code>Notice: Undefined index: $k in /home/site/page.php on line 404</code></p>

<p>When it is like below with the the full <code>$k =&gt; $v</code> everything works though. I don't even use <code>$v</code>. Why do I need it in the <code>foreach</code> loop to make it work then? </p>

<pre><code>&lt;? if ( $arr[ 'status'][ 'chain'] ) { 
     foreach ( $arr[ 'status'][ 'chain'] as $k =&gt; $v) { ?&gt;
        &lt;tr&gt;
            &lt;td class="line_item_data status_td"&gt;
                &lt;?= $ arr[ 'status'][ 'chain'][$k][ 'message'] ?&gt;
            &lt;/td&gt;
            &lt;td align="center"&gt;
                &lt;img src="images/green_check.gif" width="20" /&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;? } 
} ?&gt;
</code></pre>

<p>I did see <a href="http://stackoverflow.com/a/2732502/1252748">this answer</a>, but don't know that it really applies. Thanks so much!</p>
