title: json_decode in PHP with multiple of the same names but different values
body: <p>I am trying to decode a json data set with many entires that have the same names but are paired with multiple different values.</p>
  
  <p>Example:</p>
  
  <pre><code>{"id":"XXX",
  "price":"XXX",
  "size":"XXX",
  "id":"YYY",
  "price":"YYY",
  "size":"YYY"}
  </code></pre>
  
  <p>I have no problem building an array when there is only one value for each name by doing this:</p>
  
  <pre><code>$array = json_decode($array4,true);
  </code></pre>
  
  <p>PHP array:</p>
  
  <pre><code>  array(3) { 
  ["id"]=&gt; string(3) "XXX" 
  ["price"]=&gt; string(3) "XXX" 
  ["size"]=&gt; string(3) "XXX" 
  }
  </code></pre>
  
  <p>but when I try to use the whole file which contents ~4000 different values with paired between ~4 names I get a response of NULL when I want the json_decode to be something like:</p>
  
  <pre><code>   array(3) { 
  ["id"]=&gt; string(3) ("XXX","YYY") 
  ["price"]=&gt; string(3) ("XXX","YYY") 
  ["size"]=&gt; string(3) ("XXX","YYY") 
  }
  </code></pre>
  
  <p>Can anyone help?</p>