من قبل
Marouen Sayari , Senior PHP Programmer and Full-time Freelancer, Zend Certified Engineer , Self-employed
Since PHP 5.3 you can use the DateTime class
Example:
$date1 = new DateTime('date string');
$date2 = new DateTime('second date string');
$interval = $date1->diff($date2);
echo $interval->format('%d'); //%d for number of days