<div class="row" id="interested-in">
<div class="col-12">
<h2>Heading Here</h2>
<div class="row">
<?php
use Joomla\CMS\Language\Text;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from('#__content');
$query->order('id DESC ');
$query->limit('3');
$db->setQuery((string)$query);
$res = $db->loadObjectList();
$i = 0;
foreach ($res as $r) {
$introimage = $r->images;
$id = $r->id;
$title = $r->title;
$published = $r->publish_up;
$intro = $r->introtext;
if (++$i > 3) break;
echo '<div class="col-lg-4 col-md-6">';
echo '<div class="card">';
if ($introimage == null || $introimage == '/') {
echo '<div class="card-img-top holding-image" alt="' . $title . '"></div>';
} else {
echo '<img class="card-img-top" src="' . $introimage . '" alt="' . $r->title . '"/>';
}
echo '<div class="card-body">';
echo '<a href="' . JRoute::_('index.php?option=com_content&view=article&id=' . $id) . '">';
echo '<h5 class="card-title mb-4">'.$title.'</h5>';
echo '</a>';
echo '<time datetime="'. $published . '" class="mb-2 text-muted">'.$published.'</time>';
echo '<p class="card-text">'.mb_strimwidth("$intro", 0, 80, "...").'</p>';
echo '</div>';
echo '</div>';
echo '</div>';
} ?>
</div>
</div>
</div>
Call to a member function format() on string
Call to a member function format() on string