Here
public function sectohrs($seconds) {
$Stunden = floor($seconds / 3600); $Rest1 = (($seconds / 3600) - $Stunden); $Minuten = floor($Rest1 * 60);
return $Stunden.'h '.$Minuten.'m';
}
you need to call the function like this
$Func->sectohrs($ranking['TotalPlayTime'])
Be aware that i am using classes so you need to change it but you can also do this
inside Ranking.php
Code:
function sectohrs($seconds) {
$Stunden = floor($seconds / 3600); $Rest1 = (($seconds / 3600) - $Stunden); $Minuten = floor($Rest1 * 60);
return $Stunden.'h '.$Minuten.'m';
}
Call it like this
Code:
<div class="p15 center">'.sectohrs($result['TotalPlayTime']).'</div>