If you can create an .htaccess file to your webroot - no problem.
Your webroot will look something like this: /home/usr/public_html
Search for an .htaccess file. If it doesn't exist you can create one in a text editor like Notepad. Save it as htacccess.txt.
Put this code into the file:
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html
Save and close the file. FTP it to your webroot directory. Rename the file .htaccess (that's period followed by htaccess). If you try to upload the file already called .htaccess, it won't work.
You can now include php tags in your html file just as if it had a .php extension.
I used this no problem and got the original info from
http://www.desilva.biz/php/phpinhtml.html
If you want to pass this from a php page to your html instead of just embedding the php code in your html page you can do something like this:
In your php page following the retrieval of your variable:
header("Location:myhtmlpage.html?v={$var}");
This will work as long as no text is displayed (echoed) on the php prior to the html call.
You can then retrieve the $var number from a simple $_GET variable. In your html page:
<p>My magic number is <?=$_GET['v'];?></p>
However, I would strongly suggest that you clean the $_GET variable or you could kill the page; do something like:
<p>My magic number is <?=addslashes(htmlentities($_GET['v']));?></p>