Example #1
0
    foreach ($v as $item) {
        print '<li><a href="' . baseurl . 'news/SingleNews/' . $item->Id . '">' . $item->Title . '</a></li>';
    }
}
?>
    </ul>
  </div>

</div>

<div class="main_body">
  <div class="row  scnd_color">
    <?php 
include_once 'Model/category.php';
$ctgr = new Category();
$v2 = $ctgr->Select();
foreach ($v2 as $ctg) {
    $v3 = $model->Category3($ctg->Id);
    if ($v3 != null) {
        foreach ($v3 as $nws) {
            print '<div class="col-lg-4 news_item_sml">
        <h2><a href="' . baseurl . 'News/SingleNews/' . $nws->Id . '">' . $nws->Title . '</a></h2>
		<p>' . $nws->Author->Name . ' || ' . $nws->Datetime . ' || <a href="' . baseurl . 'News/Category/' . $ctg->Id . '">' . $ctg->Name . '</a></p>
        <p> <img src="' . baseurl . 'images/news_images/' . $nws->Id . $nws->Image . '" >' . substr($nws->News, 0, 500) . '
        <p><a class="btn btn-default" href="' . baseurl . 'Home/News/' . $nws->Id . '" role="button">View details »</a></p>
      </div>';
        }
    }
}
?>
  </div>