abovetopsecret
Programmer
I have a list coming from the database that outputs itself in vertical line, can anybody look at this piece of code and help me to get it outputting horizontally in 4's then after 4it goes to the next line.
There is no CSS controlling the <ul> tage either, even though it conatins a couple of classes for text styles and all.
Ta
Code:
<?php
$cnt = 0;
echo "<td>";
while($cnt < $top_count) {
$qw=mysql_query("select * from tbl_touroperators where Nom_Top = '$top_array[$cnt]'");
$rw=mysql_fetch_assoc($qw);
echo "<ul class='navHotel'>";
echo "<li class=\"middletext\"><a href=\"[URL unfurl="true"]http://"[/URL] . $rw[Web_Top] . "\" class=\"bigweblinks\" target=\"_blank\">" . $top_array[$cnt] . "</a></li>\n";
echo ($cnt % 1 === 0 || $cnt === $top_count - 1) ? "</ul>\n" : "";
$cnt = $cnt+1;
}
echo "</td>";
?>
There is no CSS controlling the <ul> tage either, even though it conatins a couple of classes for text styles and all.
Ta