The only way that you can call PHP from a ".html" file is if you have your web server configured to send ".html" files to be parsed by PHP. This is generally a BAD idea because it will affect performance negatively.
In short, you'll have to put the code in a file that gets parsed by PHP.