Re: CR and LF Filtering
| From: | Chris Carbaugh | Date: | Sat, 16 Dec 2000 21:09:04 +0000 |
| Subject: | Re: CR and LF Filtering | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30677@lists.php.net to get a copy of this message | ||
I think someone has already replied with str_replace("\r", $string),
BUT:
You need to watch those carriage returns. If you have some text after
a <cr>, it may have been intended to overwrite the text before the
<cr>. Many command line apps do htis sort of thing in order to have a
progress line, a single line that is updated every half second or so.
I wipped up a function to handle this sort of thing a while ago. If
you like, I can dig it up for you.
Chris
On Fri, 15 Dec 2000, Donald Smith wrote:
> Date: Fri, 15 Dec 2000 07:50:07 -0600
> To: <php-general@lists.php.net>
> From: Donald Smith <don@newsvideo.com>
> Subject: [PHP] CR and LF Filtering
>
> I need to filter carriage returns and line feeds from a string. I've
> searched the string functions in the PHP Manual and nothing seems to
> do the
> job. I'm sure I'm missing something, though, and am asking this list
> for
> assistance.
>
> Thanks
> Don Smith
> mailto:don@newsvideo.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
--
"I love my country. I fear my government." - Bumper Sticker