I'm retrieving data from a mysql database into a php page. The database stores the length of an mp3 album as a number I.E. 8069 I want to I want to show this as hours minutes, so I use the following code to divide it by 60.
Code: Select all
//convert total album length into hours and minutes
$totallength = $row[TotalLength];
$lengthconvert = $totallength/60;
echo "$lengthconvert";
//endThanx in advance.
Ok I found what I was looking for.
Code: Select all
//convert total album length into hours and minutes
$totallength = $row[TotalLength];
$lengthconvert = $totallength/60;
$round=round($lengthconvert,2);
echo "$round";
//end