leeboycymru
Programmer
Hi,
I have a piece of code that simply draws a number of elements out of the database. What I need this code to do is to display for example 5 elements from the db, then on the 6th it creates a new line for another 5 and so on.
Here is the code:
<?
$cnt=0;
while($cnt<$top_count)
{
$qw=mysql_query("select * from tbl_touroperators where Nom_Top = '$top_array[$cnt]'") or die (mysql_error());
$rw=mysql_fetch_assoc($qw);
echo "<td class='middletext'><a href='[Web_Top]' target='_blank' class='bigweblinks'>$top_array[$cnt],</td>";
$cnt=$cnt+1;
}
//$top
?>
Cheers
Lee
I have a piece of code that simply draws a number of elements out of the database. What I need this code to do is to display for example 5 elements from the db, then on the 6th it creates a new line for another 5 and so on.
Here is the code:
<?
$cnt=0;
while($cnt<$top_count)
{
$qw=mysql_query("select * from tbl_touroperators where Nom_Top = '$top_array[$cnt]'") or die (mysql_error());
$rw=mysql_fetch_assoc($qw);
echo "<td class='middletext'><a href='[Web_Top]' target='_blank' class='bigweblinks'>$top_array[$cnt],</td>";
$cnt=$cnt+1;
}
//$top
?>
Cheers
Lee