View Single Post
  #8 (permalink)  
Old 11-12-2009, 12:37 PM
sequencehosting's Avatar
sequencehosting sequencehosting is offline
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,335
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

Quote:
Originally Posted by Johnny View Post
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
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Create your own website/blog/forum with our 30-Day FREE Trial
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support
Reply With Quote