Mega Code Archive

 
Categories / Php / Code Snippets
 

A clock that updates

<HTML> <HEAD> <META HTTP-EQUIV="refresh" CONTENT=1"; URL=ih.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>