Programmer76
Programmer
Hi,
I am trying to create a csv file using fwrite and the file is created no problem.
I am simply looping my MySQL recordset and entering it into the file as follows:
It looks like the field TextInfo contains some extra cariage returns or line breaks and this is messing up the csv file when I import it into Excel.
My guess is that someone has edited the field through PHPMyAdmin and hit the enter button. The problem is that you can't see an acual new line character o anything...
Any ideas how I can deal with this?
CES
I am trying to create a csv file using fwrite and the file is created no problem.
I am simply looping my MySQL recordset and entering it into the file as follows:
Code:
$strData = $row['MyID'] . "|" . $row['TextInfo'];
fwrite($FileHandle, $strData);
It looks like the field TextInfo contains some extra cariage returns or line breaks and this is messing up the csv file when I import it into Excel.
My guess is that someone has edited the field through PHPMyAdmin and hit the enter button. The problem is that you can't see an acual new line character o anything...
Any ideas how I can deal with this?
CES