SharkBait Posted August 22, 2007 Share Posted August 22, 2007 Hi, I am trying to write information to a file which will be then used to be imported into Excel. I noticed that some of the values that I am retrieving from a database have some sort of carriage return in them so after I have dumped the results to a database with a delimiter, some of the fields break the import because excel thinks its a new line. I've tried to replace chr(13) chr(10), \r\n, \n etc and I am not sure which one it is. The data that goes into the database is from simple textarea in an HTML form where the user can type whatever they want into it and use the enter key for w newline. Since nl2br() works with the database fields, I am assuming it reads the chr() value but which one is it I should be looking at to replace? Chr(10), Chr(13) combination of the two? The database/website is on a Linux machine if that helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.