I want to do sorting for all headers of a table:
[code]
<table>
 <tr>
  <td width="10"><StudentID</td> //it is a number, click it and sorting
  <td width="100">Exam Subject</td> //it is a name, click it and sorting
  <td width="100">Date</td> //it is a date, click it and sorting
  <td width="100">Marks</td> //it is a number, click it and sorting
  </tr>
<?php
while($row = mysql_fetch_array($result))
{
list($studentid, $subject, $date, $s) = $row;
?>
 <tr> 
  <td width="10"><?php echo $studentid;?></td>
  <td width="100"><?php echo $subject;?></td>
  <td width="100"><?php echo $date;?></td>
  <td width="100"><?php echo $s;?></td>                     </tr>
 <?php
 }
?>
</table>
[/code]