where do you have the datas for this output - in database or in a extern file like a txt-file?
if Database, its the best method, if you use different MySQL-Order's for a sortable output
$query = 'SELECT * FROM `'.TABLE_PREFIX.'deine_tabelle` '
.'ORDER BY `'.$orderby.'` '.$ordering.' '
.' ';
$orderby is the name of the field
$ordering is the order-direction (ASC or DESC)
if you dont need a free sortable list (means: only a sorted list for one output), its enough, to use the field name and direction as hardcoded text like
$query = 'SELECT * FROM `'.TABLE_PREFIX.'deine_tabelle` '
.'ORDER BY `name` ASC '
.' ';
if you read a text-file, you need other methods like sort, asort, natsort etc
if you need more help, we need the code to read the data's (i think, the function "lister"). your posted code in the top is only the output