This is a clock that updates, it actually merely does a refresh every 1 second, this is assuming that you create a file called clock.php and copy the examnple below into it
<META HTTP-EQUIV=”refresh” CONTENT=1″; URL=clock.php”>
Print “The time is: “;
$hour = date(‘H’); //hours.
$minute = date(‘i’); //minutes.
$seconds = date(‘s’); //seconds
$time = “$hour : $minute : $seconds”; //put them together