Re: Storing html in a variable - how?
| From: | scottrus at ipass dot net | Date: | Sat, 22 Jul 2000 04:38:29 +0000 |
| Subject: | Re: Storing html in a variable - how? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7670@lists.php.net to get a copy of this message | ||
You need to escape out your " marks from the HTML. Here's a quick example:
Won't Work:
$body = "<img src="/images/myimage.jpg">";
Will Work:
$body = "<img src=\"/images/myimage.jpb\">";
Note the \ before each " within the HTML.
-- Scott
On Sat, Jul 22, 2000 at 12:52:44PM +0100, Jon Lawrance wrote:
> I want to send an html formated email using the mail command.
>
> I already understand you're supposed to tag the format type as html in the
> mail command. However, I don't know how to store an html page in a variable.
>
> This code doesn't work:
>
> $body="<td width="26%" height="286" valign="top"
> bgcolor="#99CC00">
> <p><font face="Verdana, Arial, Helvetica,
> sans-serif"><b><font
> size="2">Name<br>
> Position<br>
> Company<br>
> Phone<br>
> Email<br>
> Source<br>
> Country<br>
> Type of project<br>
> Notes</font></b></font></p>
> </td>"
>
> Ideally I would like to just cut and paste the html for the email from
> Dreamweaver and slap some quotation marks around it, but I'm sure its not
> that easy - damn!
>
> What should I do?
>
> Thanks,
>
> Jon
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Scott