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:
Here are the offending characters that I managed to rip using Notepad (they appear as rectangular symbols):
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.
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.