Page 1 of 1

MSSQL Query results in no spacing

Posted: Mon May 22, 2006 7:29 am
by Randolph
Hey guys and gals,

First post on devnet. w00t. Anyway, not sure if this is the right forum or not, but I have an issue I need help with.

I currently have a back-end admin setup to allow our Public Information Officer to post Press Releases to the website. On the backend, they can insert spaces (line returns) between paragraphs no problem. And when you go back to edit the same row, the spaces are still there.

Ok thats fine and all, except when I query the specific row and put it into a table, the spacing is not there. I know there has to be a way to do this, simply for the fact that I am doing it right now on phpBB.

I hope someone can help! Thanks!!! 8)

Posted: Mon May 22, 2006 7:39 am
by GM
What does the source of the HTML page look like?

Sounds to me like you probably need the "nl2br" PHP function, that turns all new lines into "<BR \>" HTML entities.

Posted: Mon May 22, 2006 7:44 am
by php3ch0

Posted: Mon May 22, 2006 8:01 am
by Randolph
That function worked!!! Thanks a bunch.

http://www.marionso.com/mediarelease.php?id=89