Reply to Re: Newbie: show page break in records

Your name:

Reply:


Posted by Jan Declercq on 10/18/05 13:50

Erwin Moller wrote:

> Bjorn Skauge wrote:
>
>> Hi,
>>
>> I've just started to learn php and sql, and I noticed that there are
>> several php discussion groups here. Pardon me if this is the wrong
>> group, and I hope my first question isn't too silly. :-)
>>
>> I'm building a website that will publish articles, so I have an
>> article table which contains a heading field, an ingress field, and a
>> body field which will hold the complete article. There are line shifts
>> (or page breaks) in this field, but my display-page won't show them.
>> How do I show the article with the page breaks?
>
> Hi
>
> Add to the 'page breaks' a <br>
>
> so if you use \n as pagebreak, replace them
> echo str_replace("\n","\n<br>",$yourContent);
>
> Regards,
> Erwin Moller

A better way would be: nl2br()
http://www.php.net/nl2br

[Back to original 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

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