Hey,
If i were you i'd change the format of the flat-file to on item per line which would be easier but either way this will work; your file data in in $data:
if( preg_match("/([a-zA-Z0-9\-\_\.+])\s+\"(.*)\",/",$data,$re_matches) )
{
$some_arr[$re_matches[0]] = $re_matches[1];
}
elseif( preg_match("/([a-zA-Z0-9\-\_\.+])]) (.*)\,/",$data,$re_matches )
{
$some_arr[$re_matches[0]] = $re_matches[1];
}
for the first if; data file layout:
var0 "some test with spaces and other chars",
for the (first) elfeif; data file layout:
var0 some test with spaces and other chars,
Now to use the data all you need to do is use normal php code using your var names in the above. Everything after the first space in the second file layout will be catched and put in an array. the var name can only contain upper/lower case letters, numbers and chars:-_. in this re.
Hope this helps...