title: PHP json_encode issue with array 0 key
body: <p>I am having a problem using json_encode to generate a json encoded string from an array.</p>
  
  <p>The section of the array in question looks like this</p>
  
  <pre><code>RatingDistribution (Array, 11 elements)
      0 (Array, 1 element)
          0 (String, 3 characters ) 4.5
      1 (Array, 1 element)
          1 (String, 4 characters ) 11.9
      2 (Array, 1 element)
  </code></pre>
  
  <p>But produces this in the string:</p>
  
  <pre><code>"RatingDistribution":[["4.5"],{"1":"11.9"},
  </code></pre>
  
  <p>I would expect this:</p>
  
  <pre><code>"RatingDistribution":[{"0":"4.5"},{"1":"11.9"},
  </code></pre>
  
  <p>All I'm doing is this:</p>
  
  <pre><code>$result = json_encode($array);
  </code></pre>
  
  <p>Have I done something wrong or do I need more code to ensure the 0 key is present?</p>
  
  <p>Cheers
  Andy</p>