referesh time automatically

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yasir_memon
Forum Commoner
Posts: 48
Joined: Tue Aug 11, 2009 12:29 am

referesh time automatically

Post by yasir_memon »

kindly tell me is there any function by which time automatically refresh as system time
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: referesh time automatically

Post by califdon »

yasir_memon wrote:kindly tell me is there any function by which time automatically refresh as system time
If you mean with PHP, the current time can be obtained with date(), which will be the time when the HTML was assembled and sent to the browser. After that, of course, PHP is no longer running. If you mean something like a realtime clock on a web page, that obviously cannot be done with PHP, which only runs on the server. There are countless ways to do it with Javascript, but it will depend on the system time in the viewer's work station.
yasir_memon
Forum Commoner
Posts: 48
Joined: Tue Aug 11, 2009 12:29 am

Re: referesh time automatically

Post by yasir_memon »

thanks for reply yes kindly tell me java script code for that i want to do same as u said
yasir_memon
Forum Commoner
Posts: 48
Joined: Tue Aug 11, 2009 12:29 am

Re: referesh time automatically

Post by yasir_memon »

????????????
yasir_memon
Forum Commoner
Posts: 48
Joined: Tue Aug 11, 2009 12:29 am

Re: referesh time automatically

Post by yasir_memon »

??????????
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: referesh time automatically

Post by jackpf »

Assign a javascript variable to php's value of time().
Post Reply