comparing two dates

how can i compare two dates in php?in the database the date looks like this 2011-10-2if i wanted to compare todays date against the date in the database to see which one is greater or less than how would i do it?i tried this.\[code\]$today = date("Y-m-d");$expire = $row->expireDate //from dbif($today < $expireDate) { //do something; }\[/code\]but it doesnt really work that way. whats another way of doing it?
 
Back
Top