<?php

$news = mysqli_query($conn,"
SELECT *
FROM village_news
WHERE village_id='$village_id'
ORDER BY news_date DESC
LIMIT 5
");

?>

<div class="news">

<marquee direction="up" scrollamount="3" onmouseover="this.stop();" onmouseout="this.start();">

<?php

if(mysqli_num_rows($news) > 0){

while($n=mysqli_fetch_assoc($news)){
?>

<div style="margin-bottom:10px;">

<a href="/digital_panchayat/village_web/news_detail.php?id=<?php echo $n['id']; ?>" style="text-decoration:none;color:black;">

<b><?php echo $n['title']; ?></b><br>

<small><?php echo date("d M Y",strtotime($n['news_date'])); ?></small>

</a>

<hr>

</div>

<?php
}

}else{

echo "No Village News Available";

}

?>

</marquee>

</div>