Jump to content

[SOLVED] Spacing, Line Breaks - HELP!


JSHINER

Recommended Posts

When I use the following:

<?php echo htmlentities(stripslashes($page['listing']['desc'])); ?>

 

It displays the text as:

 

----

 

Text. Line 2. Line 3

 

----

 

Which is INCORRECT

 

When I use the following in a text area:

 

<textarea name="desc"><?php echo htmlentities(stripslashes($page['listing']['desc'])); ?></textarea>

 

It displays the text as:

 

----

 

Text.

 

Line 2.

 

Line 3.

 

----

 

Which is CORRECT.

 

Any ideas why this is happening?

 

 

Link to comment
https://forums.phpfreaks.com/topic/70462-solved-spacing-line-breaks-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.