I have a problem with the breaking of the lines. I hope that it is called like this in english. I do not mean word wrap but the pressing of Return.
A tried to implement phpBB into my website. and therefore wnated announcements of the board as news on my page. I managed to do that. Wasn't so difficult.
But please feel free to have a look at my problem. The news section is here: http://www.starfall.de
The post on the board is here: http://board.starfall.de/viewtopic.php?t=285
And I want the news to look exactly like the topic, but as you can see it doesn't and I do not have the slightest idea why.
Could you help me?
thx Cookie
Line Breaks
Moderator: General Moderators
-
Cookie-Monster
- Forum Newbie
- Posts: 2
- Joined: Mon May 05, 2003 10:46 am
- Location: Germany
- Contact:
-
Cookie-Monster
- Forum Newbie
- Posts: 2
- Joined: Mon May 05, 2003 10:46 am
- Location: Germany
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
It's probably preferable to use nl2br() as it does exactly what the str_replace() snippet you posted above does.Cookie-Monster wrote:That was a good idea. I also discovered another method of doing it:
$message = str_replace("\n", "\n<br />\n", $message);
Wonder why I didn't do it like this in the first way.
Mac