title: Undefined offset when creating/adding Multi-Dimensional array values
body: <p>I am adding to an array on the fly, using code similar to this;</p>
  
  <pre><code> $arrayF[$f+1][$y][$x+1] = $value+1;
  </code></pre>
  
  <p>But I receive this in the error report:</p>
  
  <p>Undefined offset: 1</p>
  
  <p>QUESTION: Why do I get an undefined offset when I am trying to CREATE an array value?</p>
  
  <p>What can I do about it?</p>
  
  <p>Further info, if relevant:
  It occurs in a loop as so, where I am 'sprawling' through a masterArray</p>
  
  <pre><code>if (is_array($arrayF[$f])){ 
      foreach ($arrayF[$f] as  $key2 =&gt; $arrayF2) {
          $y = $key2;
          foreach ($arrayF2 as $key3 =&gt;$value) {
              $x = $key3;
              if (($y&lt;=100)&amp;&amp; ($y&gt;=1)&amp;&amp;($x&lt;=100)&amp;&amp;($x&gt;=1)){
                  if ($value &lt; $arrayMaster[$y][$x])  {
                      $arrayMaster[$y][$x] = $value;//resets value in a master array
                      $arrayF[$f+1][$y][$x+1] = $value+1;//creates a new array for F to 'sprawl' with
                      $max = $f+1;
                  }
              }
          }
      }
  }
  </code></pre>