I want to use file_get_contents() on an html file with 3 $vars written inside it and have those vars get the data assigned to them through $_POST.
example:
-html file-
<html>
.
.
<table>
<tr>
<td>first name</td><td>last name</td><td>id</td>
</tr>
<tr>
<td>$fname</td><td>$lname</td><td>$id</td>
</tr>
</table>
</html>
-php file-
<?php
.
.
$fname = $_POST('fname');
$lname = $_POST('lname');
$id = $_POST('id');
$page = file_get_contents("test.html");
echo $page;
?>
what I did for now was to set a comment "<!--split-->"
where the vars go and then I explode() the file_get_contents("test.html"), attach the vars to the end of it and implode() the $page.
but it seems kinda intensive for such a small task and I hoped for a better solution.
I hope I have been clear enough with my question. if not please ask and I'll try to clarify more if I can.