First off the PHP part of the page is only fired once (when the page is processed by the webserver) and is not actually in you htmlpage. So unless you want the whole page to reload you need to do it in a javascript.
What I would do is make an div tag with the clock element in it in your html-code like this:
<div id="clock"></div>
and build a javascript class to handle the actual clock:
StartUp();
function UpdateClock() {
var clockElement = document.getElementById('clock');
var time = new Date();
var hours = time.getHours() + ":" + time.getMinutes() + ":" + time.getSeconds();
var date = time.getMonth() + " " + time.getDate() + ", " + time.getFullYear();
clockElement.innerHTML = hours + " " + date;
}
function StartUp() {
intervalId = setInterval(UpdateClock, 1000);
}
And that should do it. The hours and date variable needs to be formated ofcourse, but the basic is there
WilyeECoyote