Quote:
Originally Posted by Johnny
That is because you need to use single quotes around your HTML:
PHP Code:
$logo = '<img src="/logo.jpg" width="300" height="100" />';
As long as you wrap your HTML code with single quotes instead of double, you can put any tag your little heart desires in there.
You can also use something called 'heredoc' notation and not worry about quotes whatsoever... like this:
PHP Code:
$msg = <<<EOT
<p>I'm using 'single quotes,' "double quotes," and HTML!</p>
<p>...and it's totally legal!</p>
<p>Heck, I'll even throw in a $variable</p>
EOT;
|
Thanks so much Johnny,
After all the tutorials I have read saying "make sure you use single quotes", I still use double
I certainly won't forget that again.
I have 4 scripts than run by cron and when I receive the email it shows the cron command in the header. I would like to be able to edit the header of the email. Would you mind if I send you PM you the script quickly? If you could just say if it's possible that would be really helpful.
Thank you