Forums

PHP Wordwrap in the_content (3 posts)

  1. ikazim
    Member
    Posted 2 years ago #

    $haha = the_content();
    $content = wordwrap($haha, 500, "</p><p>");
    echo $haha;

    Any suggestions?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    Can I ask why you want to apply a word-wrapping function in a script when this is normally a browser function? As long as your content doesn't include <pre></pre> tags, pretty much all web browsers will word-wrap the content automatically.

  3. ikazim
    Member
    Posted 2 years ago #

    Actually I want to make it auto, after 700 - 800 word count. It should starts with a new paragraph automatically. !

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.