php seconds to time code example
Example 1: seconds to minutes php
echo gmdate("H:i:s", 685);
Example 2: php date to seconds
<?php
$str = 'Tue Dec 15 2009';
$timestamp = strtotime($str);
echo $timestamp;
//output: 1260831600
?>
echo gmdate("H:i:s", 685);
<?php
$str = 'Tue Dec 15 2009';
$timestamp = strtotime($str);
echo $timestamp;
//output: 1260831600
?>