I have PHP file for make table with data row from database . I want send this page to email . but when I get content contains HTML and PHP code . but I want send only result of page in HTML.
i use this code
$str = file_get_contents( 'template.php' );
$mail = "test@tst.com";
mail($mail,$str);
and this
$str = readfile("'template.php'");
but result contains php code in email . how i can get only html result?