if you are trying to include a php script in html document then you can do something like this.
//ShowResult.php
<?php
$var = "Hello World";
?>
//yourpage.html
<html>
<head> <?php include "ShowResult.php" ;?> </head>
<body>
<?php echo $var; ?>
</body>
</html>
</html>
What I have done here is to simply create an external php file called "ShowResult.php" where I create a variable called var and assigned it a value of "Hello World". In the html file called "yourpage.html" I have called the php file using the php "include" function.
In you can apply this principle in other situations to call an external php script in your html file. have a look
here for more help.