<!DOCTYPE html> <html> <body> <?php $date1=date_create("1984-01-28"); $date2=date_create("1980-10-15"); $diff=date_diff($date1,$date2); echo $diff->format("%R%a days"); ?> </body> </html>
<?php $date1=date_create("1984-01-28"); $date2=date_create("1980-10-15"); $diff=date_diff($date1,$date2); echo $diff->format("%R%a days"); ?>