I would, include the below function in some "data.inc" page:
<?
function myexample($topic,$header) {
echo "
<h1>the topic is $topic</h1><br>
<h2>the header is $header</h2>
";
}
myexample("my topic","my header");
?>
I would put the function in one file, include that on pages when needed, then you can call the funtion with " <? myexample("my topic","my header"); ?> as you wish. Play around with it. Hope it helps...