title: PHP empty key in array
body: <p>In PHP, is there a function for finding the lowest numerical key without a value in an array? I have an array like this:</p>
  
  <pre><code>array (
      0 =&gt; 'nested array',
      1 =&gt; 'nested array',
      2 =&gt; 'nested array',
      3 =&gt; 'nested array',
      6 =&gt; 'nested array',
      7 =&gt; 'nested array',
  )
  </code></pre>
  
  <p>and I would like to add a value to this array (at <code>4</code>), not necessarily unique, and get its position back without altering the rest of the keys. Is the easiest way to loop through the array and test <code>isset()</code>, or is there an easier way?</p>