title: php - how to add data in array with a loop
body: <p>how to add data in array with a loop</p>
  
  <p><strong>example array required</strong></p>
  
  <pre><code>$get_id = array(
  array('id' =&gt; '1', 'updated' =&gt; '2012-08-11T04:08:53+01:00'));
  </code></pre>
  
  <p><strong>data required to add in the array</strong></p>
  
  <pre><code> ID
  -----
  1
  2
  3
  4
  </code></pre>
  
  <p>please note that key is important in this case</p>
  
  <p><strong>output should be like</strong></p>
  
  <pre><code>$get_id = array(
  array('id' =&gt; '1', 'updated' =&gt; '2012-08-11T04:08:53+01:00'),
  array('id' =&gt; '2', 'updated' =&gt; '2012-08-11T04:08:53+01:00'),
  array('id' =&gt; '3', 'updated' =&gt; '2012-08-11T04:08:53+01:00'),
  array('id' =&gt; '4', 'updated' =&gt; '2012-08-11T04:08:53+01:00')
  );
  </code></pre>
  
  <p>thanks for your help</p>