SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Almeaty Member
    Join Date
    Jul 2000
    Location
    Nowhere
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Line breaks after x characters?

    Hi:

    In PHP is it possible to automatically create line breaks after the x-th character? I need this for newsletters which are being sent via the mail() function. It would be some hard job to do this by hand...

    thx

  2. #2
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    1. There are programs that do this, eg: Textpad

    2. In PHP, use the wordwrap function:

    <?php

    $mail = wordwrap($mail, 65);

    ?>

  3. #3
    Happy Holidays !! Paul S's Avatar
    Join Date
    Mar 2001
    Location
    Mexico
    Posts
    1,287
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    You can check the wordwrap function here http://www.php.net/manual/en/function.wordwrap.php

  4. #4
    Almeaty Member
    Join Date
    Jul 2000
    Location
    Nowhere
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey thanks alot! works perfectly


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •