title: How to extract data from csv file in PHP
body: <p>I have a csv file which looks like this</p>
  
  <pre><code>$lines[0] = "text, with commas", "another text", 123, "text",5;
  $lines[1] = "some without commas", "another text", 123, "text";
  $lines[2] = "some text with commas or no",, 123, "text";
  </code></pre>
  
  <p>And I would like to have a table:</p>
  
  <pre><code>$t[0] = array("text, with commas", "another text", "123", "text","5");
  $t[1] = array("some without commas", "another text", "123", "text");
  $t[2] = array("some text, with comma,s or no", NULL , "123", "text");
  </code></pre>
  
  <p>If I use <code>split($lines[0],",")</code> I'll get <code>"text" ,"with commas" ...</code>
  Is there any elegant way to do it?</p>