PenAndPapers PenAndPapers - 1 year ago 160
PHP Question

PHP convert integer to time

How can I convert integer to time in minutes e.g.

would give
. I've tried

$toMin = 5;
echo date('i', ($toMin*60)).'mins';

But it only returns

Answer Source

so something like:

$time='7.5'; //, 8.3, 2.2. 



echo $x[0] .'hours and '.$min.'mins';
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download