Changing values of all similar sub arrays in PHP
<p>I've got the following 2D array, stored inside the array variable $my_array</p>

<pre><code>Array 
( 
[0] =&gt; Array 
       ( 
         [0] =&gt; 3 
         [1] =&gt; 6 
         [2] =&gt; 3 
       ) 
[1] =&gt; Array 
       ( 
         [0] =&gt; 3 
         [1] =&gt; 6 
         [2] =&gt; 3 
       ) 
[2] =&gt; Array 
       ( 
         [0] =&gt; 3 
         [1] =&gt; 6 
         [2] =&gt; 3 
         ) 
)
</code></pre>

<p>I wanted to decrement all the [1] sub array values by 3. Tried the following code, with no success. </p>

<pre><code>   $my_array[$i]['1']=($my_array[$i]['1'])-3;
   print_r($my_array);
</code></pre>

<p>Ideas?</p>
