my $sort_order = $q->param('sort_order'); my $order = $q->param('order'); print '<tr>'; foreach(@column_headings){ print "<td><A href=\"pastRequests.pl?order=$_&sort_order=" . (($_ eq $order && $sort_order eq 'desc') ? 'asc' : 'desc') . "\">$_</a></td>"; } print '</tr>'; my @records = ##Get your data, maybe an array of hashes?? @records = reverse(@records) if($sort_order eq 'asc'); foreach(@records){ ##Output records }
- Tom
In reply to Re: Resort Table
by tcf22
in thread Resort Table
by tbone
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |