Differentiate between comma and comma space
<p>I have a line coming from a CSV file like this:</p>

<p>"Item 1","Item 2","Item 3","Item 4","Item 5, Test 6"
Repeat for thousands of lines
There are no spaces between the items.</p>

<p>The comma between Item 5 and Test 6 is supposed to be there. I am trying to turn this line into an array.</p>

<pre><code>$i=1;
$temp_array = array();
$number = COUNT($array);
while($i &lt;= $number) {
    $temp_array[] = explode(",", $array[$i]);
    $i++;
}
</code></pre>

<p>The array is currently outputting as this"</p>

<pre><code>[1] =&gt; Array
        (
            [0] =&gt; "Item 1"
            [1] =&gt; "Item 2"
            [2] =&gt; "Item 2"
            [3] =&gt; "Item 2"
            [4] =&gt; "Item 5
            [5] =&gt; Test 6"

        )
</code></pre>

<p>It should output as follows:</p>

<pre><code>[1] =&gt; Array
        (
            [0] =&gt; "Item 1"
            [1] =&gt; "Item 2"
            [2] =&gt; "Item 2"
            [3] =&gt; "Item 2"
            [4] =&gt; "Item 5, Test 6"

        )
</code></pre>
