Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11269
| Path | csiph.com!eeepc.pasdenom.info!news.pasdenom.info!news.dougwise.org!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Date | Tue, 08 Feb 2011 22:49:15 +0100 |
| From | Luuk <Luuk@invalid.lan> |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 6.1; en_US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7 |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.php |
| Subject | Re: mail function and wordwrap |
| References | <iirfsp$pqc$1@news.eternal-september.org> <as1828-g9g.ln1@luuk.invalid.lan> <iis73u$1s1$3@news.eternal-september.org> |
| In-Reply-To | <iis73u$1s1$3@news.eternal-september.org> |
| X-Enigmail-Version | 1.1.1 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 7bit |
| Message-ID | <qbq828-eko.ln1@luuk.invalid.lan> (permalink) |
| Lines | 48 |
| NNTP-Posting-Host | 80.101.116.74 |
| X-Trace | 1297201755 news.xs4all.nl 41117 [::ffff:80.101.116.74]:34825 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.php:11269 |
Show key headers only | View raw
On 08-02-11 20:55, Jerry Stuckle wrote: > On 2/8/2011 9:51 AM, Luuk wrote: >> On 08-02-11 14:19, Bill B wrote: >>> I have looked through php.net (and googled) without finding an example >>> of this particular scenario. >>> >>> If the message is the result of: >>> >>> $msg = "A very long sentence\n"; >>> $msg .= "A short sentence\n"; // less than 70 characters >>> $msg .= "Another short sentence\n"; // less than 70 characters >>> $msg .= "Another very long sentence"; >>> >>> $msg = wordwrap($msg, 70); >>> >>> Does wordwrap only act on the longer individual strings? Will the short >>> strings appear on lines of their own? >> >> There is, of course, only one string in your example. (which contains >> more sentences....) >> >>> >>> In other words, will the formatting (\n) in each string taken separately >>> override the overall wordwrap? >> >> Yes, the current 'break' character (3rd paramerer) is not changed, so if >> a short 'sentence' is found it will be shorter than the specified width >> in the second parameter. >> >>> >>> Thank you, >>> >>> Bill B >> >> above concluded after a bit of testing ;) >> > > IOW you wrote the test script for him, Luuk? How good of you :) > no, i copied the lines in out of the original post.... and added 'echo $msg;' to the end oh wait, i made the last sentence a bit longer too.... ;) And, yes, i'm not a consultant, as you are, so i *know* how to do it. -- Luuk
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: mail function and wordwrap Jerry Stuckle <jstucklex@attglobal.net> - 2011-02-08 14:55 -0500 Re: mail function and wordwrap Luuk <Luuk@invalid.lan> - 2011-02-08 22:49 +0100
csiph-web