I want to get the contents of a php file in HTML. I am using it as a HTML email template but it needs to be populated with dynamic data from my database.
I tried
file_get_contents('/emails/orderconfirm.php');
But all that does is return the php code before it is processed by the server into HTML.
I'm guessing it's really easy? any ideas would be much appreciated.
Thanks