Sorry for posting like this but I am learning I want all the results to have a hr or any html based line except the last one I put a line break but it won't look good help me
foreach ($newsqry->result() as $n) {
$nr=$n->numrows();
$nlink = array_keys($routesAll, "news/index/" . $n->n_id);
?>
<div class="row">
<div class="col-md-6 imgpost">
<a class="post-imgn" href="<?=site_url($nlink)?>">
<img class=""src="<?=base_url("assets/uploads/news/thmb/$n->img")?>"alt="<?=character_limiter($n->title,'50')?>">
</a>
</div>
<div class="col-md-6 descpost">
<div class="post-category com" >
<?php
$t = $n->tags;
$s = explode(',', $t);
foreach ($s as $a) {
?>
<a class="tags" href="<?=site_url("news/view?tag=".strtolower(str_replace(' ','-',$a)))?>"><?=ucwords($a)?></a>
<?php } ?>
</div>
<h3 class="post-title news">
<a href="<?=site_url($nlink)?>"><?=character_limiter($n->title,'100')?>"</a>
</h3>
<ul class="post-meta">
<li><a href="<?=site_url("news/view?author=".strtolower(str_replace(' ','-',$n->author)))?>"><?=$n->author?></a></li>
<li><i class="fa fa-clock-o" aria-hidden="true"></i> <?=date("h:i A",strtotime($n->time))?> <?=date("F-d-y",strtotime($n->date))?></li>
</ul>
<p class="descfornews"><?=character_limiter(strip_tags($n->desc),'190')?></p>
</div>
</div>
<?php if($nr<1){echo "<hr>";}else{ echo "<h3>End of Page</h3>";}?>
<?php
}
?>