Home Forums Plugin Support WP User Frontend (Free Version) echo textarea content with line breaks

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  ritalinaaa 4 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15772

    ritalinaaa
    Member
    Post count: 9

    Hello
    How can I echo each line separetely?

    Everytime someone write something like:

    “first line
    second line
    third line”

    I get: “first line second line third line”

    How can I solve this?
    I can't allow users to user WYSIWYG, all I need is to use the simple textarea and that the output have each line as a new paragraph.

    #15781

    Tareq Hasan
    Keymaster
    Post count: 2831

    In that case, you've to output those fields manually with the nl2br function. May be like <?php echo nl2br( get_post_meta( $post->ID, 'meta_key', true ) ); ?>

    #15783

    ritalinaaa
    Member
    Post count: 9

    Isn't there a way to output <li> or <p> instead of <br>?

    Because if I only get <br> I won't be able to format the text the way I need.

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘echo textarea content with line breaks’ is closed to new replies.