Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #11220
| Date | 2011-02-08 15:51 +0100 |
|---|---|
| From | Luuk <Luuk@invalid.lan> |
| Newsgroups | comp.lang.php |
| Subject | Re: mail function and wordwrap |
| References | <iirfsp$pqc$1@news.eternal-september.org> |
| Message-ID | <as1828-g9g.ln1@luuk.invalid.lan> (permalink) |
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 ;) -- Luuk
Back to comp.lang.php | Previous | Next | Find similar | Unroll thread
Re: mail function and wordwrap Luuk <Luuk@invalid.lan> - 2011-02-08 15:51 +0100
csiph-web