title: array_push not working for integers?
body: <p>I'm using <code>array_push</code> method to get all the integers into array as follows.</p>
  
  <pre><code>$response = json_decode($jsonResponse);
   foreach($response as $item) { //foreach element in $response
       $type = $item; 
       $unique_id = $type-&gt;id;
       $id_array=array();
       array_push($id_array, $unique_id);     
   }  
   var_dump($id_array);
  </code></pre>
  
  <p>But the <code>$id_array</code> contains only last integer element. Is there any wrong with above code or can't we push integer elements into php array?</p>