An updating clock

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

<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV=”refresh” CONTENT=1″; URL=clock.php”>
</HEAD>
<BODY>
<?php
Print “The time is: “;
$hour = date(‘H’); //hours.
$minute = date(‘i’); //minutes.
$seconds = date(‘s’); //seconds
$time = “$hour : $minute : $seconds”; //put them together
Print $time
?>
</BODY>
</HTML>

LEAVE A REPLY

Please enter your comment!
Please enter your name here

*