title: PHP: How can I explode a string by commas, but not wheres the commas are within quotes?
body: <p>I need to explode my string input into an array at the commas. However the string contains commas inside quotes.</p>
  
  <p>Input:</p>
  
  <pre><code>$line = 'TRUE','59','A large number is 10,000';
  
  $linearray = explode(",",$line);
  $linemysql = implode("','",$linearray);
  </code></pre>
  
  <p>Returns $linemysql as:</p>
  
  <pre><code>'TRUE','59','A large number is 10','000'
  </code></pre>
  
  <p>How can I go about accomplishing this, with the explode ignoring the commas inside the quote marks?</p>