For some reason o'connor's code only reads one line of a csv for me... I had to replace the line
$data = fgetcsv($fp, 1000, $delimiter, $enclosure); // $escape only got added in 5.3.0
with this:
$data;
while (!feof($fp))
{
$data[] = fgetcsv($fp, 0, $delimiter, $enclosure); // $escape only got added in 5.3.0
}
...to get all of the data out of my string (some post data pasted into a textbox and processed only with stripslashes).