[PHP] Removing a return character

2004-12-10 Thread Shaun
Hi, I have a system that scans through a CSV File and inserts each row into a database. I have just noticed that some rows have a return character in them - a small square - and this is causing errors in the mysql query. Does anyone know how I can remove such chracters? -- PHP General

Re: [PHP] Removing a return character

2004-12-10 Thread Greg Donald
On Fri, 10 Dec 2004 10:10:20 -, Shaun [EMAIL PROTECTED] wrote: I have a system that scans through a CSV File and inserts each row into a database. I have just noticed that some rows have a return character in them - a small square - and this is causing errors in the mysql query. Does

Re: [PHP] Removing a return character

2004-12-10 Thread M. Sokolewicz
John Nichel wrote: Greg Donald wrote: On Fri, 10 Dec 2004 10:10:20 -, Shaun [EMAIL PROTECTED] wrote: I have a system that scans through a CSV File and inserts each row into a database. I have just noticed that some rows have a return character in them - a small square - and this is causing

Re: [PHP] Removing a return character

2004-12-10 Thread tg-php
All the suggestions made earlier make sense. You could use a regular expression or a str_replace() if you knew what you were looking for. And as someone mentioned, depending on your data set, you might want to use trim() (or the left or right variety thereof). When dealing with a single line

Re: [PHP] Removing a return character

2004-12-10 Thread Raditha Dissanayake
Shaun wrote: Hi, I have a system that scans through a CSV File and inserts each row into a database. I have just noticed that some rows have a return character in them - a small square - and this is causing errors in the mysql query. Does anyone know how I can remove such chracters? Options

Re: [PHP] Removing a return character

2004-12-10 Thread John Nichel
Greg Donald wrote: On Fri, 10 Dec 2004 10:10:20 -, Shaun [EMAIL PROTECTED] wrote: I have a system that scans through a CSV File and inserts each row into a database. I have just noticed that some rows have a return character in them - a small square - and this is causing errors in the mysql

Re: [PHP] Removing a return character

2004-12-10 Thread Richard Lynch
Shaun wrote: I have a system that scans through a CSV File and inserts each row into a database. I have just noticed that some rows have a return character in them - a small square - and this is causing errors in the mysql query. Does anyone know how I can remove such chracters? Might I