spacing in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Patriot
Forum Commoner
Posts: 34
Joined: Tue Jun 18, 2002 1:36 pm

spacing in php

Post by Patriot »

Hi, i'm currently trying to format my news posts so they are easier for the user to read.
My problem is my spacing, without it the article is all scrunched, but i havent found a way to do it automatically without doing

Code: Select all

<br><br>
In the place of the spaces.

Heres an example:
http://www.cnn.com/2003/LAW/06/06/peter ... index.html
I want to have 2 spaces between the paragraphs on my articles, but i dont know exactly how.

I tried

Code: Select all

$thevar=str_replace("/n", "<br><br><br>", $thevar);
But that of course didnt work. Any help is VERY appreciated!
User avatar
Sevengraff
Forum Contributor
Posts: 232
Joined: Thu Apr 25, 2002 9:34 pm
Location: California USA
Contact:

Post by Sevengraff »

aren't you using nl2br()? Or use the <p> tag.
Post Reply