PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The fields $esAlert and $esAlarm currently contain a number in seconds (e.g. 90). But I want to save this into minutes and seconds (e.g. 1:30), so I was looking to do:
// divide seconds by 60 to get minutes, floor it because we don't want partial numbers
$minutes = floor($ConfRow['esAlert'] / 60);
// seconds will be equal to the left over amount
$seconds = $ConfRow['esAlert'] - ($minutes * 60);
echo 'Time: ' . $minutes . ':' . $seconds;