Find time difference in php

$date='2016-11-07 18:55:11';date_default_timezone_set('Asia/Karachi');
$day1=date("Y-m-d h:i:s");
$ry=strtotime(date('Y-m-d H:i:s')) - strtotime($date);
$days= round(abs($ry) / 60,2). " minute";
echo "<script>alert('$days')</script>";

0 comments:

Post a Comment

My Instagram