I would also like to replace it so I can preserve the format when displaying it.
Here is the format of the data...
"1","3203","Lots of text with multiple"\n"
newlines and linefeeds","yes"
... etc.
here is what I use for the other csv files...
$fd = fopen("$filename", "r");
$x = 0;
while (!feof ($fd)) {
$buffer[$x] = fgets($fd, 4096); $x++;
}
foreach($buffer as $line) {
if($line != "") {
list($var1,$var2 = split (",", $line);
$sql = "insert ...."
This works fine as long as you can read the entire line and it has no newline or carriage returns in it.