Forum Moderators: coopster
The next script outputs the current day of week, month, day of month and then a static time:
The code is:
<?php
echo date('l, F j, Y, H:i:s A ');
?>
today this code would output:
Saturday, December 22, 2007, 02:19:45 and then stops there.
How can i make the seconds increment every time a second goes by, every time a minute is finished, every time an hour is finished.
I suspect this has something to do with looping, how can I do it.?
Second, my website is hosted on an american server; how can I incorporate some code in the codeblock above so that the browser displays the time matching the user computer all still using php and not JAvascript?
Regards,
dbarasuk
Date().[url=http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Date:getTimezoneOffset]gettimezoneOffset[/url]()
google search 'javascript clock' and you should get a decent amount of results with examples.
[php.net...]