Re: concatenating strings

From: Date: Sat, 22 May 2004 10:49:40 +0000
Subject: Re: concatenating strings
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186757@lists.php.net to get a copy of this message
"Bill Freeburg" <Bill@MarathonSoftware.com> wrote in message news:20040522104218.72839.qmail@pb1.pair.com... > how do I add newline commands in the middle of a text string? > > I'm sending an email with the function > mail($sendto,$subject,$message,$headers) > > The message is > $message = "My name is " . $myname . " My favorite color is " . $color; > > How do I write it so the email message text is on two lines, > My name is BILL > My favorite color is RED > > Thanks, > Bill Freeburg Hi Bill, this should do the trick: $message = 'My name is ' . $myname . chr(10) . ' My favorite color is ' . $color; Regards, Torsten

« previous php.general (#186757) next »