Setting value in Nested Php Array
<p>Hi I'm trying to loop through a array and set a keys value. Very basic question. </p>

<p>The Code I tried is below.</p>

<p><a href="http://pastebin.com/d3ddab156" rel="nofollow">http://pastebin.com/d3ddab156</a> </p>

<pre><code>&lt;?php
$testArray = array("bob1" =&gt; array( 'name' =&gt; "bob1", 'setTest' =&gt; '2'));

foreach($testArray as $item)
{
    $item['setTest'] = 'bob';
} 

print_r($testArray);
</code></pre>

<p>I imagine I'm missing something stupid here and it is going to be a D'oh! moment for me. What is wrong with it?</p>

<p>Thanks.</p>
