i want to sort qtitle by numbers. anyone can help me with tat.. i tried to modify the code below, but i couldn't find the solution. please help me..
<?php
$query1 = "SELECT * FROM table1";
$result1 = mysql_query($query1);
$i=1;
$num_row=mysql_num_rows(result1;)
while ($row1 = mysql_fetch_array($result1)) {
$qid = $row1['qid'];
$qtitle = $row1['qtitle'];
$query2 = "SELECT * FROM table2 WHERE qid='$qid'";
$result2 = mysql_query($query2);
while ($i<$num_row){
echo "<span style=\"text-decoration:underline; font-weight:bold;\">".$i." ".$qtitle."</span><br />";
$i++;
}
while ($row2 = mysql_fetch_array($result2)) {
$aid = $row2['aid'];
$atitle = $row2['atitle'];
echo "".$atitle."<br />";
}
echo "<br />";
}
?>