Re: note 9087 added to fgets
| From: | J. M. Castagnetto | Date: | Mon, 16 Oct 2000 21:33:42 +0000 |
| Subject: | Re: note 9087 added to fgets | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6531@lists.php.net to get a copy of this message | ||
Better yet use chop(), instead of the 2 str_replace().
(comment above added to your on-line note)
--- dgasparri@tin.it wrote:
> To strip the newline caracter at the end of the
> string:
>
> $buffer = fgets($fp, 4096);
> $buffer=str_replace(chr(10),"",$buffer);
> $buffer=str_replace(chr(13),"",$buffer);
>
> http://www.php.net/manual/function.fgets.php
>
>
> --
> PHP Notes Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-notes-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-notes-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
=====
--- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
__________________________________________________
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/