title: php to convert CSV to JSON with nested objects
body: <p>I have csv file like this:</p>
  
  <pre><code>data,IF,VVS1,VVS2
  D,23,17,15
  E,17,15,14
  </code></pre>
  
  <p>What i need is to convert this CSV into JSON but to look like this:</p>
  
  <p>{"D" : {"IF":"23", "VVS1":"17", "VVS2":"15"},"E" : {"IF":"17", "VVS1":"15", "VVS2":"14"}}</p>
  
  <p>Any help?</p>