title: Use of PHP explode() function
body: <p>I have a problem, I want to split a string variable using the explode function but there are a limitation, imagine having the next string variable with the next value : </p>
  
  <pre><code>$data = "3, 18, 'My name is john, i like to play piano'";
  </code></pre>
  
  <p>Using the explode function : explode(",", $data), the output will be : </p>
  
  <pre><code>array(
         [0] =&gt; 3,
         [1] =&gt; 18,
         [2] =&gt; 'My name is john,
         [3] =&gt; i like to play piano'
        );
  </code></pre>
  
  <p>My target is to split the variable $data by comma excluding the ones that are between ' ' chatacters.</p>
  
  <p>e.g. <code>array(
             [0] =&gt; 3,
             [1] =&gt; 18,
             [2] =&gt; 'My name is john, i like to play piano'
            );</code></p>
  
  <p>If anyone can tell me a way to do this, I'd be grateful.</p>