I think this would be the easiest way. 86400 is the number of seconds in a day, so you just have to take it times the number of days you want (5) and delete the article if it's less then the current time.
I believe there's a library in PHP that can translate from time() to a more readable format. Although I think I just use a static time as a comparison (kind of like what Isaiah did) in my webpages... it's been awhile since I've written anything in PHP.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.