I am using PHP and MYSQL.
here is my code
<?php
$result = mysql_query("SELECT * FROM `item` order by `ID` limit 0, 5");
$rows = mysql_num_rows ($result);
$item = 0 ;
while ($item < $rows){
$title = mysql_result($result,$list,"name");
$id = mysql_result($result,$list,"ID");
echo "<div id="new"> $id . $title </div> ";
$item++;
}
?>
My question is that, is it possible if the items are more than 5 (as you can see I limited items), then create a new div id=new to display the rest items?
many thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…