Possible Duplicate:
Calling PHP functions within HEREDOC strings
I am using Swiftmailer PHP to create an order complete page. When the customer lands on this page, I use an include to a PHP file.
This page file has SwiftMailer EOM HTML that gets sent to the customer. However I have the HTML parts in chunks, so the header is via a function called header and order totals are the same too. I want to be able to include EOM functions inside the EOM. Is this possible?
Id = 46088;
// MAIL FUNCTION
function mailToSend($Id){
// EOM CAN'T BE TABBED
$html = <<<EOM
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
getHeader($Id);
getOrderTotalBoxTable($Id);
</body>
</html>
EOM;
}
mailToSend(46088);