You are here: Re: Keeping the formatting of text « PHP Programming Language « IT news, forums, messages
Re: Keeping the formatting of text

Posted by Geoff Berrow on 12/17/20 11:54

Message-ID: <earbtp$66m$2@blue.rahul.net> from axlq contained the
following:

>That converts line breaks to <br /> which doesn't validate as
>HTML unless you do str_replace("<br />", "<br>", nl2br($text));
>And doing that seems inefficient since nl2br() already performs
>str_replace("\n", "<br />", $text). You may as well do the
>str_replace yourself and ignore nl2br().

Except that it's not always \n
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация