To do it strictly in PHP, the only way I can think of is to get the unix timestamp for each date, subtract the two to see how many seconds difference there is, and then do some math to see how many days that is. If it's 30 days, then it's a month. I guess.
If there's any chance you have MySQL or get these dates from MySQL, it's far easier...
$date1 = "2000-12-01"
$date2 = "2001-01-30"
SELECT TO_DAYS('$date2') - TO_DAYS('$date1') AS day_diff
will return the number of days between the two dates.
Let me know if you need more help, if this relates to MySQL.
---John Holmes...