Re: [PHP] strings and \n

2002-01-25 Thread Jason Wong

On Saturday 26 January 2002 04:48, Greg Sidelinger wrote:
> Ok I'm having a problem with the new line char \n in strings.  I'm
> trying to contrast an email that gets sent with the mail() function.
> Here is what I'm doing.
>
> $message = "line1\n";
> $message .= "line2\n\n";
> $message .= "line3\n";
> ...
> $message = "lne99";

Is this a typo in your message or in your code? Shouldn't it be:

  $message .= "lne99";

>
> mail ("email", "subject", $message);
>
>
> but when the email is received not all the new lines r taken. Can anyone
> help me.  Also where can I get a list of all the special chars like \n
> and what they meain.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Biggest security gap -- an open mouth.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] strings and \n

2002-01-25 Thread Greg Sidelinger

\r\n or \n\r is not helping.  The thing that confuses me is that some of
the \n lines work just fine while others do not. So if anyone give give
me a hint y it is not working all the time please send me email.

Greg

-Original Message-
From: Nick Wilson [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 25, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] strings and \n

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Greg Sidelinger blurted
> Ok I'm having a problem with the new line char \n in strings.  I'm
> trying to contrast an email that gets sent with the mail() function.
> Here is what I'm doing.
>  
> $message = "line1\n";
> $message .= "line2\n\n";
> $message .= "line3\n";
>  
> but when the email is received not all the new lines r taken. Can
anyone
> help me.  Also where can I get a list of all the special chars like \n
> and what they meain.

I think you need to try \r\n (poss. other way round)
That should do it.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UcZYHpvrrTa6L5oRAuliAJ4vouXleTkRY6IvSva2xS6BBnJHMgCeKHJW
n3BzuUtk5LYJ3gra3SqxnXs=
=fgqQ
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strings and \n

2002-01-25 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Greg Sidelinger blurted
> Ok I'm having a problem with the new line char \n in strings.  I'm
> trying to contrast an email that gets sent with the mail() function.
> Here is what I'm doing.
>  
> $message = "line1\n";
> $message .= "line2\n\n";
> $message .= "line3\n";
>  
> but when the email is received not all the new lines r taken. Can anyone
> help me.  Also where can I get a list of all the special chars like \n
> and what they meain.

I think you need to try \r\n (poss. other way round)
That should do it.
- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8UcZYHpvrrTa6L5oRAuliAJ4vouXleTkRY6IvSva2xS6BBnJHMgCeKHJW
n3BzuUtk5LYJ3gra3SqxnXs=
=fgqQ
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]