You mean you want to make, say index.html, into index.php? If so, here's a very simple example.
Slice the image and make the HTML page as usual. Afterwards, when the HTML page looks the way you want, encapsulate the HTML page in PHP as shown below, save as index.php, FTP, and then call index.php from your browser.
Code:
<?php
echo <<<END
<html>
<body>
Hello!
</body>
</html>
END;
?>
Of course, TMTOWTDI.