Hi how can I assign html body tag contents into php variable then use it as the body of email

Recommended Answers

file_get_contents can be used to get the contents of a url into a PHP variable.

Check out http://www.howtogeek.com/howto/programming/php-get-the-contents-of-a-web-page-rss-feed-or-xml-file-into-a-string-variable/ for more details.

Jump to Post

All 3 Replies

I think what hishama is asking is something like this:

<?php
$var = "<p>Sample</p>";

echo $var;
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.