datetime - PHP convert integer to time -
how can convert integer time in minutes e.g. 5
give 30mins
. i've tried
<?php $tomin = 5; echo date('i', ($tomin*60)).'mins'; ?>
but returns 05mins
so like:
$time='7.5'; //, 8.3, 2.2. $x=explode('.',$time); $min=60*($x[1]/10); echo $x[0] .'hours , '.$min.'mins';
Comments
Post a Comment