PHP code help - date related

Soldato
Joined
18 Oct 2002
Posts
7,639
Location
Sutton Coldfield, Birmingham
I have a list of items in a database and they all have a date when they were added.

The date field in the database is a timestamp - YYYY-MM-DD 00:00:00

I want to display the items on a page and have them listed as 'NEW' if they are less than 7 days old, how would I go about doing this with mktime, etc?

I've read the php manual on mktime and it confuses the hell out of me haha.
 
Back
Top Bottom