I would like to get the total number of seconds based from the given time, for example the following given data below:
$timein=04-01-2017 7:56:37 am;
$timeout=04-01-2017 5:15:17 pm;
$totalseconds= ?
I would like to get the total number of seconds based from the given time, for example the following given data below:
$timein=04-01-2017 7:56:37 am;
$timeout=04-01-2017 5:15:17 pm;
$totalseconds= ?
<?php
$time1=strtotime("04-01-2017 7:56:37 am");
$time2=strtotime("04-01-2017 5:15:17 pm");
echo $time2-$time1;