Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11090 > unrolled thread
| Started by | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| First post | 2011-02-08 14:55 -0500 |
| Last post | 2011-02-08 22:49 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.php
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2011-02-08 14:55 -0500 |
| Subject | Re: mail function and wordwrap |
| Message-ID | <iis73u$1s1$3@news.eternal-september.org> |
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 :) -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
[toc] | [next] | [standalone]
| From | Luuk <Luuk@invalid.lan> |
|---|---|
| Date | 2011-02-08 22:49 +0100 |
| Message-ID | <qbq828-eko.ln1@luuk.invalid.lan> |
| In reply to | #11090 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web