Im working on my review page and I have this this simple question.
how do I change my database result, into "[result x] days/month/years ago"?
it seems like curent date minus(-) post date. but, how do I write it corectly.
thanks for your help.
here is my code,
<?php
$sql=mysql_query("SELECT * FROM reviews ORDER BY review_code DESC LIMIT 3");
while($db=mysql_fetch_array($sql)){
echo "
<div style='padding-bottom: 25px;'>
Post Date: ".$db['post_date']." minus(-) Current Time: ".time()."
</div>
";}
?>
the result is
Post Date: 2017-06-27 08:00:00 minus(-) Current Time: 1498701679
can anyone help me? please..