Re: variables with ""

From: Date: Mon, 17 Mar 2003 14:27:16 +0000
Subject: Re: variables with ""
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139958@lists.php.net to get a copy of this message
a) $mail->Body = "<h1 style=\"color: prple; font-size: > 20pt;\">Heading</h1>"; b) $mail->Body = '<h1 style="color: prple; font-size: > 20pt;">Heading</h1>'; The second method is better reabadle but also disable variable substitution and most escape sequences (\n and the like). hth "Ian a. gray" wrote: > > Hi, > just a quick question. How do I include double quotes > in a variable? I am trying to put html code in a > variable in a mailing program: > > ======================== > > $mail->Body = "<h1 style="color: prple; font-size: > 20pt;">Heading</h1> > Please e-mail me at <a > > href="mailto:mail@mail.com">mail@mail.com</a>" > > ======================== > > I know that you don't have to inclose everything in > html tags with quotes, but sometimes you do. The > above qon't work obviously as it has nested quotes. > How do I get the above to work? > > Many thanks, > > Ian Gray > > __________________________________________________ > Do You Yahoo!? > Everything you'll ever need on one web page > from News and Sport to Email and Music Charts > http://uk.my.yahoo.com -- Arnold Schommer FS EDV Service & Beratung GmbH An der Pönt 48 40885 Ratingen fon: +49 2102 186 400 fax: +49 2102 186 499 mailto:aschommer@fs-edv.de http://www.fs-edv.de

« previous php.general (#139958) next »