There are a bunch of ways to do it, and none of them are very nice...
For a timer thing like this its often better to use some kind of external service to keep track of the time. If you're on windows, make a COM object that runs as a windows service and then just query that for the time with PHP. You can do similar things with Linux though I don't know the specifics. This is assuming you need a central timer, like for the duration of the game.
Another way to do it, though less percise, is to store the start time of the timer in a database or something, and then anytime a player loads the page just subtract time() - $timerStartTime and send that to the browser. This certinally isn't real time, but then again your game probably isn't either.
You also have the window.setTimeout() javascript function, that would allow each player's browser to keep track of its own timer. Anytime you do this though you introduce the risk of someone fudging the data that's sent to the server that could mess things up.
If you come back with some more specifics maybe me or someone else could help you out more.
Erestar