Link to home
Start Free TrialLog in
Avatar of comprows
comprowsFlag for United States of America

asked on

echo doesn't render <textarea> wording as it was entered in a form with space between paragrahs, etc.

Hello Experts:

I can see new lines in mysql, but when I echo the wording, every line runs together.  

Here's my code:
<div id="copy"><?php echo $row_Recordset1['Copy']; ?></div>

Thank you, help is appreciated.

Avatar of Greg Alexander
Greg Alexander
Flag of United States of America image

This may do it for you

<div id="copy"><?php echo nl2br($row_Recordset1['Copy']); ?></div>

Open in new window

Avatar of comprows

ASKER

That didn't work for me, but that might be because there isn't a \nl in the copy.  There is space between paragraphs though.  You can see it here in the copy shown below from the text area:

Daily, Weekly or Monthly Specials
You can enter your special AskNRD promotion in
this location at any time.

<a href="../advertising.php">Advertising Info</a>
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks to both Experts!