title: Adding an object to PHP array, before adding from MySQL select
body: <p>I have a PHP page encoding a MySQL select into JSON.
  I would like to add a "Status value" as the first object of my array.<p>
  PHP code</p>
  
  <pre><code>{
  //CREATE USER UNKNOWN ARRAY RESULT
  $Statusresult = mysql_query("SELECT TEXT_KEY, TEXT_VALUE FROM T_TEXTS WHERE TEXT_KEY = 'USER_FAILED' ") or die(mysql_error());
  $Statusrows = array();
  while($s = mysql_fetch_assoc($Statusresult)) 
  {
      $Statusrows[] = $s;
  }
  print json_encode($Statusrows);
  </code></pre>
  
  <p>}</p>
  
  <p>This results is:</p>
  
  <pre><code>{
  "TEXT_KEY" = "USER_FAILED";
  "TEXT_VALUE" = "UNKNOWN USER";
  </code></pre>
  
  <p>}</p>
  
  <p>I would like to add the first object manual, to have the result look like this:</p>
  
  <pre><code>        {
      "STATUS" = "1";
      "TEXT_KEY" = "USER_FAILED";
      "TEXT_VALUE" = "UNKNOWN USER";
  }
  </code></pre>
  
  <p>How can I do this ?</p>
  
  <p>I have tried this approach, but somehow there is an error...</p>
  
  <pre><code>{
      //CREATE USER UNKNOWN ARRAY RESULT
      $Statusresult = mysql_query("SELECT TEXT_KEY, TEXT_VALUE FROM T_TEXTS WHERE TEXT_KEY = 'USER_FAILED' ") or die(mysql_error());
      $Statusrows = array();
      $Statusrows = { "STATUS" =&gt; "1" };
      while($s = mysql_fetch_assoc($Statusresult)) 
      {
      //  $Statusrows[] = $s;
          array_push($Statusrows, $s);    
      }
      print json_encode($Statusrows);
  }
  </code></pre>