EDIT: Here is a portion of $preparedstring
:
555555,Jones,Brian,NYC,1000,2011-10-21 00:00:00,Check,1542,0, ,Check, ,0, ,Check, ,; 666666
You're close, but arrays don't work that way. You can't put a foreach
inside an array constructor like that. It should look like this:
$outerARR = explode(";", $preparedstring);
$arr = array();
foreach ($outerARR as $arrvalue){
$innerarr = explode(",", $arrvalue);
$arr[] = $innerarr;
}
Demo: http://codepad.org/I5wFFczR