I want to send emails and store all email layouts in a seperate subfolder.
Let's assume the file emails/mailLayout.php contains something like
<a><?php echo $item["name"]?></a>
Approach to get the content:
$item["name"] = "John Doe";
$emailContent = file_get_contents("emails/mailLayout.php);
//send mail...
$emailContent should contain <a>John Doe</a> but thats not the case
Any solutions or better approaches?