php how to get hour and minutes in given seconds code example Example: seconds to minutes php echo gmdate("H:i:s", 685);