Page 1 of 1

mySql -> php -> page; a formatting question

Posted: Mon Aug 22, 2005 1:27 am
by intellivision
I'm pulling some text out of a mySql table and putting it on a page. Here's the source when I View Source in my browser:

Code: Select all

I've owned this for almost 6 months now, and I can say it's mediocre to fairly good in every respect except sound: it's really damn good at producing music, given its size.

In fact, the sound will surprise most people. It's that good. Of course, everything is relative, and  my rating of the sound of the On Tour takes into account its sheer portability.

In a 15' x 15' room with a cocktail party (I tried) it's not going to cut it as the music source.
But on the page it runs together like this:
I've owned this for almost 6 months now, and I can say it's mediocre to fairly good in every respect except sound: it's really damn good at producing music, given its size. In fact, the sound will surprise most people. It's that good. Of course, everything is relative, and my rating of the sound of the On Tour takes into account its sheer portability. In a 15' x 15' room with a cocktail party (I tried) it's not going to cut it as the music source.
Question: how can I get it to retain the breaks?

Posted: Mon Aug 22, 2005 1:30 am
by sticksys

Code: Select all

<?
echo nl2br("$MsyBody");
?>
=]

Posted: Mon Aug 22, 2005 2:14 am
by vigge89
sticksys wrote:

Code: Select all

<?
echo nl2br("$MsyBody");
?>
=]
Better (faster):

Code: Select all

<?php
echo nl2br($MsyBody);
?>
=)

Posted: Mon Aug 22, 2005 11:19 pm
by intellivision
Worked perfectly.

Danke.