You don't, really. You serve a PHP file, not an HTML file. The PHP file you serve would have to call your function at some point, but you know that.
PHP, like with other web languages, runs through a "filter" before the user gets it. The filter renders the HTML by "running" the PHP.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Correct. You can more or less have a complete HTML file, and include PHP here and there between the PHP delimiters. However, for any of the PHP to function, you save the file with a ".php" extension.
I do that for a page on my site, where it's completely xhtml except for an RDF feed. The only php on the page is the call to the RDF parser, which outputs HTML.
However, for that one function call to work, the file is served as a PHP, not HTML.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37