Improvs
Member
Hi, can someone help me to figure out how can I change data from Thread "post_date" table in such format as XF have:
1 day ago, 1 minut ago, 1 our ago, Monday etc.
Is it possible? If it's not possible at all, can someone share with me most common way?
Beg you for help
1 day ago, 1 minut ago, 1 our ago, Monday etc.
Code:
$db = \XF::db();
$threads = $db->fetchAll('SELECT * FROM xf_thread ORDER BY `last_post_date` DESC');
foreach ($threads as $oneThread) {
echo $oneThread[post_date];
}
Is it possible? If it's not possible at all, can someone share with me most common way?
Beg you for help