I'm new to php. Need to calc number of days between 2 dates. Ex: From: 1/25/2002 to 1/31/2002 would be 6, just subtract. BUT, From: 1/31/2002 to 2/5/2002, how would I calc this. I've looked at date functions. started looking at mCal but this is new to me. I think I could just write my own function but would like to know if anything is already out there. THANKS!
convert it to native form (UNIX timestamp), then
$day=606024; $delta=(int)(date2/$day)-(int)(date1/$day);
Don't try to optimize because 'day' is not '24 hours'.