title: PHP array json_encode adding extra quotes
body: <p>I have the following php array, and would like to print it as a clean JSON file, but i'm getting extra quotes around the brackets and comma's. Although the current JSON i get is valid JSON it's not how I want it formatted. See PHP array below, my json_encode output and the preferred json output:</p>
  
  <pre><code>    Array
   (
  [0] =&gt;             {
  [1] =&gt;                 code : "EU27",
  [2] =&gt;                 debtA : 967576248244,
  [3] =&gt;                 debtB : 6971817122583,
  [4] =&gt;                 id : "eur",
  [5] =&gt;                 name : "EU",
  [6] =&gt;                 popY : 8584663069945,
  [7] =&gt;                 popZ : 7565913300548            }
  [8] =&gt;             ,
  [9] =&gt;             {
  [10] =&gt;                 code : "US",
  [11] =&gt;                 debtA : 9090198981283,
  [12] =&gt;                 debtB : 92189801202,
  [13] =&gt;                 id : "usa",
  [14] =&gt;                 name : "United States",
  [15] =&gt;                 popY : 4514703786570,
  [16] =&gt;                 popZ : 774697283542            }
      )
  </code></pre>
  
  <p>Current json_encode output:</p>
  
  <pre><code>   [
  " {",
  " code : \"EU27\",",
  " debtA : 1739414366187,",
  " debtB : 8719158563660,",
  " id : \"eur\",",
  " name : \"EU\",",
  " popY : 460572909944,",
  " popZ : 2396933253407 }",
  " ,",
  " {",
  " code : \"US\",",
  " debtA : 7810766144794,",
  " debtB : 10536751929567,",
  " id : \"usa\",",
  " name : \"United States\",",
  " popY : 8571487476842,",
  " popZ : 1716024078740 }"
      ]
  </code></pre>
  
  <p>Preferred JSON output:</p>
  
  <pre><code>   [
   {
    code : "EU27",
    debtA : 1739414366187,
    debtB : 8719158563660,
    id : "eur",
    name : "EU",
    popY : 460572909944,
    popZ : 2396933253407 },
  {
    code : "US",
    debtA : 7810766144794,
    debtB : 10536751929567,
    id : "usa",
    name : "United States",
    popY : 8571487476842,
    popZ : 1716024078740 }
     ]
  </code></pre>
  
  <p>I have been searching stackoverflow and found similar problem but can not get it to work. Probably because of my understanding of php and php arrays. Any help is appreciated.</p>