title: Prevent json_encode() from automatically generating integer keys
body: <p>I'm trying to encode a two-dimensional PHP array to JSON with json_encode() and I'm having a problem:</p>
  
  <p>My array looks like this:</p>
  
  <pre><code>$array = array( array( 1325368800, 6898 ) );
  </code></pre>
  
  <p>When I encode it to JSON using json_encode(), the output looks like this:</p>
  
  <pre><code>  'data' : [ 
            '0' : [  '0' : '1325368800',      '1' : '6898' ]
             ]
  </code></pre>
  
  <p>I would like to get rid of the automatically generated integer keys and have it like this:</p>
  
  <pre><code>'data':  [ [ '1325368800', '6898' ] ]
  </code></pre>
  
  <p>Any tips?</p>