Page 1 of 1

spacing in php

Posted: Fri Jun 06, 2003 7:35 pm
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!

Posted: Fri Jun 06, 2003 11:15 pm
by Sevengraff
aren't you using nl2br()? Or use the <p> tag.