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!
i'm a new php scripter and try to write out time continuously. i know the code that writes out the current time when the page is loaded
- $today = date("G:i:s"); - but i'd like to have it displayed as a digital clock.
is there anybody who can help me?
You'd either have to have a constant refresh of the screen (yuk) or do it with something other than PHP. PHP is server-side, therefore once the page has loaded to get a new time to be printed you have to reload the page. If you want a clock that continuously updates you need to use a client-side technology like Javascript.
That's what I said - PHP can't do this you need to use something client side. I'm sure you'd find lots of examples of programs that can do that sort of thing by doing a search at somewhere like http://www.hotscripts.com.