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

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -