Re: Hidden new line markers?

From: Date: Mon, 24 Mar 2003 20:03:30 +0000
Subject: Re: Hidden new line markers?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-140884@lists.php.net to get a copy of this message
nl2br() doesn't remove the newlines, it simply adds in the <br /> in before them. The str_replace should work, how are you trying to use it? ---John Holmes... ----- Original Message ----- From: "Jeff Lewis" <jeff@hyrum.net> To: <php-general@lists.php.net> Sent: Monday, March 24, 2003 2:56 PM Subject: [PHP] Hidden new line markers? I am using a SELECT statement to grab all items from a database table and while looping through the results I am connecting the fields with tabs and adding a new line at the end of the row to create a tab delimited file. On one field I do a nl2br in order to preserve the spacing in the field. However, when I import it into Excel, it keeps treating the <br /> as a nl. Am I missing something? I tried removing \r and \n with str_replace and I have used trim but it still doesn't work how I'm expecting it to. Does anyone have any ideas on this? Jeff

« previous php.general (#140884) next »