How to convert X hours into minutes in PHP

1 Answer

0 votes
$X = 5;

$timeStamp = strtotime("$X hours");
$minutes = abs($timeStamp - time()) / 60;

echo $minutes;



/*
run:

300

*/

 



answered Jun 12, 2020 by avibootz

Related questions

1 answer 254 views
1 answer 239 views
1 answer 307 views
2 answers 306 views
306 views asked Jun 12, 2020 by avibootz
2 answers 282 views
282 views asked Jun 12, 2020 by avibootz
1 answer 304 views
304 views asked Sep 1, 2014 by avibootz
...