I create two design to display news .
first DIV Display BIGGER images and Separate css class and display only two rows.
Second DIV Display Smaller images and Separate css class and display five rows..
I select rows in asc order from query.
my query is = select * from news order by priority asc.
My Only Need is TO Display two rows in First div and then display another rows in Second DIV.
IS This is possible using if else or any other condition...how to do this.........
but keep all div tag as it is bcoz of page design purpose......
<!-- FIRST DIV -->
<div class="post">
<div class="buffer">
<?php foreach($top2 as $top){ ?>
<div class="content"> <a href="detail.html"><img src="bhaskarcms/uploads/<?php echo $top['photo']; ?>" style="width:285px; height:100px;" /></a>
<h2><a href="detail.html"><?php echo htmlspecialchars_decode($top['headline']); ?></a></h2>
</div>
<?php } ?>
<!--<p class="details2"><a href="#">8 Comments</a> / <a href="#">Read More</a></p>-->
</div>
</div>
<!-- end post -->
<!-- SECOND DIV -->
<!-- begin post -->
<div class="post">
<div class="buffer">
<?php foreach($top2 as $top){ ?>
<div class="content1"><a href=""><img src="bhaskarcms/uploads/<?php echo $top['photo']; ?>" /></a>
<h2><a href=""><?php echo htmlspecialchars_decode($top['headline']); ?></a></h2>
</div>
<?php } ?>
</div>
</div>
<!-- end post -->