i am used to object oriented programming, and having a... timer control...
But now that I dont, i want to know how to use time.
I know that there is a time() function, but how do i use it?
I am newbie to PHP so dont laugh. Help please !
-Morrowastedecho time();
do that and see what you get. all depends on what you want to do with it.
edit: actually a timer is way different than time().is it possible to create a variable that gets the current time, then does something after a certain amount of time, like
$time = time()
if ($time = $time + 36000)
{
do this
}
i know that couldnt possibly work, but it is just an exampleyes that will never work. the time will never equal the time plus time. I am not sure what you want to do? it appears you want to do something when a certain time passes. this can only be done if you stored the time some where, like a cookie or db or session.i want to make a tick counter, ex:
(im not actually doing this, but some websites do)
every 5 minutes creating a popup, using that timer-like thing.
know any ways to do it?you can't do that with serverside language. you have to use javascript timer for that.
once serverside code is ran that is it you can't keep the time going.i just got visual studio .net (yay, im so happy my dad works for a software company), and i think i can use that for web apps, etc.
i'll look into the JS thing though
But now that I dont, i want to know how to use time.
I know that there is a time() function, but how do i use it?
I am newbie to PHP so dont laugh. Help please !
-Morrowastedecho time();
do that and see what you get. all depends on what you want to do with it.
edit: actually a timer is way different than time().is it possible to create a variable that gets the current time, then does something after a certain amount of time, like
$time = time()
if ($time = $time + 36000)
{
do this
}
i know that couldnt possibly work, but it is just an exampleyes that will never work. the time will never equal the time plus time. I am not sure what you want to do? it appears you want to do something when a certain time passes. this can only be done if you stored the time some where, like a cookie or db or session.i want to make a tick counter, ex:
(im not actually doing this, but some websites do)
every 5 minutes creating a popup, using that timer-like thing.
know any ways to do it?you can't do that with serverside language. you have to use javascript timer for that.
once serverside code is ran that is it you can't keep the time going.i just got visual studio .net (yay, im so happy my dad works for a software company), and i think i can use that for web apps, etc.
i'll look into the JS thing though