timeago php code example
Example 1: php time
<?php
$t=time();
echo($t . "<br>");
echo(date("Y-m-d",$t));
?>
Example 2: time function in php
Return the current time as a Unix timestamp, then format it to a date:
<?php
/* Unix Timestamp */
$timestamp = time();
echo $timestamp . "<br>";
echo date("d/m/Y", $timestamp);
?>