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 162 views
1 answer 157 views
1 answer 212 views
2 answers 203 views
203 views asked Jun 12, 2020 by avibootz
2 answers 162 views
162 views asked Jun 12, 2020 by avibootz
1 answer 200 views
200 views asked Sep 1, 2014 by avibootz
...