I've created a htm file with php code inside, that's very huge file i will summarize here.
<?php
//database connection and query and storing data in php variables
?>
<html>
<head>
</head>
<body>
<p><?php echo "firstname ". $var1 ?></p>
<p><?php echo "firstname ". $var2 ?></p>
<p><?php echo "firstname ". $var3 ?></p>
</body>
</html>
I'm getting output .htm file with echoing php variables successfully, now end of html file I want to create a button for save as pdf option and convert the entire document to pdf for user using php, I gone through tcpdf file but didn't find any useful source to add php code within $html.