title: PHP: how to fill an array with keys and values so 1 = 1, 2 = 2, 3 = 3 etc
body: <p>I am looking to do something like (psuedo_code)</p>
  
  <pre><code>$myarray = fill_array_keys_and_values_from_parameter1_until_parameter2(18, 50);
  </code></pre>
  
  <p>So that I get</p>
  
  <pre><code>$myarray= array(
  
  '18' =&gt; '18',
  '19' =&gt; '19',
  ...
  '50' =&gt; '50'
  )
  </code></pre>
  
  <p>without having to a for loop ideally. Is there such a PHP function, I had a browse of the manual but could not see what I was looking for.</p>
  
  <p>Thanks in advance</p>