title: Convert csv rows to associative array
body: <p>I'm having the following csv file</p>
  
  <pre><code>$file = file_get_contents($url);
  
  // file
  Date,Value1,Value2
  17-Nov-17,34,42
  16-Nov-17,22,35
  15-Nov-17,19,24
  
  $csv = explode("\n", $file);
  
  // dump
  array:10 [▼
    0 =&gt; "Date,Value1,Value2
    1 =&gt; "17-Nov-17,34,42"
    2 =&gt; "16-Nov-17,22,35"
    3 =&gt; "15-Nov-17,19,24"
  ]
  </code></pre>
  
  <p>What I want to do is to display the content of the csv file into a html-table, but first I want to convert this to an associative array. How can I do this? Does PHP provide a build-in function for this?</p>