• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

How to add "posted on" to news?

Dankoo

Active Member
Joined
Sep 4, 2010
Messages
1,007
Reaction score
27
I want to add the date news has been added, together with View Comments, here's the file:

PHP:
<?php 
require("config.php");
$ide = new IDE;
try { $ide->loadInjections("home"); }catch(Exception $e) { error($e->getMessage());}
foreach($news['news'] as $value) {
        echo "<div class='news'>";
        echo "<div class='newsTitle'>".$value['title']."</div>";
        echo "<div class='newsBody'>".$value['body']."</div>";
        echo "<div class='viewComments'><a href='".WEBSITE."/index.php/home/view/".$value['id']."'>View comments</a></div>";
        echo "</div>";
}


        echo "<div class='readArchive'><a href='".WEBSITE."/index.php/home/archive'>Go to archive posts</a></div>";
?>

Any ideas how can I use an command like this:

" . date("d M Y, H:i:s", $news['time']) . "

just example, but that's the idea '-'
 
Back
Top