title: array_push with associative array results in a multidimentional array
body: <p>I have the following function which does some stuff and returns an array:</p>
  
  <pre><code>function do_work($array){ 
        $result = array();
  
        array_push($result, array("HAHAHAH" =&gt; "looooooool"));
  
        foreach($array as $key=&gt;$val){
            array_push($result, array($key =&gt; $val));
        }
  
        return $result;
  }
  </code></pre>
  
  <p>I originally call this and pass the <code>$_GET</code> array in it. What I expect at the end is a flat JSON object. But this returns a JSON array instead:</p>
  
  <p>in my calling code:</p>
  
  <pre><code>$array = do_work($_GET);
   echo json_encode($array);
  </code></pre>
  
  <p>if I give the function following <code>GET</code> array:</p>
  
  <pre><code>handler.php?action=register_new_user&amp;shit=happens
  </code></pre>
  
  <p>This will be the result, but I want it to be a flat JSON not an array:</p>
  
  <pre><code>[{"HAHAHAH":"looooooool"},{"action":"register_new_user"},{"shit":"happens"}]
  </code></pre>