title: I would like json_encode in PHP to return a JSON array even if the indices are not in order
body: <p>but according to this: <a href="http://www.php.net/manual/en/function.json-encode.php#94157" rel="noreferrer">http://www.php.net/manual/en/function.json-encode.php#94157</a> it won't.  </p>
  
  <p>I'm using flot so I need to have an array with numeric indexes returned but what I'm getting is this:</p>
  
  <pre><code>jsonp1282668482872 ( {"label":"Hits 2010-08-20","data":{"1281830400":34910,"1281916800":45385,"1282003200":56928,"1282089600":53884,"1282176000":50262,"1281657600":45446,"1281744000":34998}} );
  </code></pre>
  
  <p>so flot is choking.  If I var_dump the array right before I call json_encode it looks like this:</p>
  
  <pre><code>array(7) {
    [1281830400]=&gt;
    int(34910)
    [1281916800]=&gt;
    int(45385)
    [1282003200]=&gt;
    int(56928)
    [1282089600]=&gt;
    int(53884)
    [1282176000]=&gt;
    int(50262)
    [1281657600]=&gt;
    int(45446)
    [1281744000]=&gt;
    int(34998)
  }
  </code></pre>
  
  <p>any ideas?</p>