question about quote and double-quoted strings

From: Date: Sun, 09 Feb 2003 00:09:41 +0000
Subject: question about quote and double-quoted strings
Groups: php.general 
Request: Send a blank email to php-general+get-134911@lists.php.net to get a copy of this message
Hi, i am just adding some mail() functions to my script and had to realize, that this: $email_from = 'From: pipetest@domain.com\r\nReply-To: pipetest@domain.com\r\n'; mail($_POST['email'],'Your account details','You can login with your account details\r\nusername: '.$_POST['username'].'\npassword: '.$_POST['password'].'\n\nhere: http://----/index.php',$email_from); will make the email include the \r\n instead of adding a line feed, but this works just fine: $email_from = "From: pipetest@domain.com\r\nReply-To: pipetest@domain.com\r\n"; mail($_POST['email'],'Your account details',"You can login with your account details\r\nusername: ".$_POST['username']."\npassword: ".$_POST['password']."\n\nhere: http://----/index.php",$email_from); Why is there this difference in the normal- & double-quoted string, i though it would only affect included variables, where one shows them and the other would need them to be added via '.' ? ...just curious :) Regards, Duncan

« previous php.general (#134911) next »