0
PHP is a server-side language.
There is a tutorial you can follow:
PHP
<?php
date_default_timezone_set('YOUR TIMEZONE');
echo $timestamp = date('H:i:s');?>
JQuery
$(document).ready(function() {
setInterval(timestamp, 1000);
});
function timestamp() {
$.ajax({
url: 'http://localhost/timestamp.php',
success: function(data) {
$('#timestamp').html(data);
},
});
}
HTML
<div id="timestamp"></div>
Source: http://stackoverflow.com/questions/36965948/create-php-live-clock



