a big hi to all the developers out there...
first of all take a look at this static html
http://www.lootah.com/arabictutor/4english/sentences/s01.htm this is the wanted format.
i've gone throug many alternateing scripts, unfortunatlly, i couldnt find that match my requirement.
what im tryin to present the result in something like this
|catid:1 |catid:2 |catid:3 |
|catnm |catnm |catnm |
|imgpath|imgpath|imgpath|
|catid:4 |catid:5 |catid:6 |
|catnm |catnm |catnm |
|imgpath|imgpath|imgpath|
|catid:7 |catid:8 |catid:9 |
|catnm |catnm |catnm |
|imgpath|imgpath|imgpath|
and so on
with the below script im able to get something like this:-
|catid:1 |catid:2 |catid:3 |
|catid:4 |catid:5 |catid:6 |
|catid:7 |catid:8 |catid:9 |
<table border="0" width="100%">
<tr>
<?
$rw = 3;//number of columns per row
$cnt = 0;
while ($result=mysql_fetch_array($query))
{
$cnt = $cnt + 1;
# Your results layout goes here
$catid=$result[0];//cat Id
$catprntid=$result[1];//parent id
$catnm=$result[2];//name
$cattitle=$result[3];//title
$imgpath=$result[4];//img src
echo "<td vAlign=top align=middle bgColor=#dbdce9>
<a href=alphabets.php?catprntid=$catid><img src=$imgpath></a></td>";
if ( $cnt >= $rw ){
print("</tr>");
$cnt = 0;
}
}
?>
</tr>
</table>