Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing: removing line breaks?

Status
Not open for further replies.

monkle

Programmer
Feb 11, 2004
132
US
I am trying to export from an mssql server into a csv file. The problem is that the data in the database is not "clean". When I do the export, it throws the columns and rows off. I have the following code trying to clean it, and it helps a lot, but I'm still having issues:

Code:
$arrRemoveChars = array("
", "
");
$var = trim(strip_tags(str_replace($arrRemoveChars, '', $row['col13'])));

Here are the offending characters that I managed to rip using Notepad (they appear as rectangular symbols):

Code:
"


"

I'm running out of ideas to solve this problem (something done in SQL prior to the import?), so if any of you have any ideas, or can point me in the right direction, it'd be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top