FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » mail function and wordwrap
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: mail function and wordwrap [message #172270 is a reply to message #172269] Tue, 08 February 2011 21:49 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 2/8/2011 4:49 PM, Luuk wrote:
> 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.
>

I *know* how to do it, also. But I also *know* how to get people to
help themselves!

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: An extremely large hash lookup mechanism
Next Topic: Unexpected error in log: php_gd2.dll
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 16:43:29 GMT 2024

Total time taken to generate the page: 0.04288 seconds