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:
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 '-'
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 '-'