1 2 3 4 5 6 7 8 9 10 11
<?php $date1="03/17/2012 9:00 PM"; $date2="03/17/2012 9:40 PM"; $diff_seconds = strtotime($date2) - strtotime($date1); echo floor($diff_seconds/3600).' hours and '.floor($diff_seconds/60).' minutes'; ?>
1
0 hours and 40 minutes