build multidimensional array from string php
<p>EDIT:  Here is a portion of <code>$preparedstring</code>:</p>

<blockquote>
  <p>555555,Jones,Brian,NYC,1000,2011-10-21 00:00:00,Check,1542,0, ,Check, ,0, ,Check,  ,; 6666666,Miler,Christopher,Chicago,1000,2011-10-26 00:00:00,Check,6406,0, ,Check, ,0, ,Check,  ,;</p>
</blockquote>

<p>I am trying to convert a HTML table to a multidimensional array.  I have converted the table into a long string, each cell being delimited with a comma and each row being delimited with a semicolon.  </p>

<p>I am not exactly sure how to build the multidimensional array from this string.  This is what I have tried so far:</p>

<pre><code>&lt;?php    
$outerARR = explode(";", $preparedstring);

    $arr = array
    (
    foreach ($outerARR as $arrvalue) {
        $innerarr = explode(",", $arrvalue);
        $innerarr[0]=&gt;array
        (
         $innerarr[];
         )
    }
    );
?&gt;
</code></pre>

<p>this gives me a syntax error near the </p>

<blockquote>
  <p>$arr = array</p>
  
  <blockquote>
    <p>(</p>
  </blockquote>
</blockquote>

<p>opening parenthesis.</p>
