Subtracting time and whatnot.
Posted: Mon Mar 03, 2008 11:15 am
So I'm making a script to tell when the person's last action on the game was, and I don't want to just put it as "Last action was at blah blah.", I want to be like "It was 2 hours, 3 minutes ago." or something like.
Basically what will happen is their last action goes into the DB, then I use date(); to "subtract" the other time from now. Unfortunately I have no idea how to go about this, and the date(); talk on PHP website is confusing as usual.
Basically what will happen is their last action goes into the DB, then I use date(); to "subtract" the other time from now. Unfortunately I have no idea how to go about this, and the date(); talk on PHP website is confusing as usual.