SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Line breaks after x characters?
-
May 26, 2001, 10:20 #1
- 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
-
May 26, 2001, 10:33 #2
- 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);
?>
-
May 26, 2001, 10:35 #3
- 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
-
May 26, 2001, 12:21 #4
- Join Date
- Jul 2000
- Location
- Nowhere
- Posts
- 278
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hey thanks alot! works perfectly
Bookmarks