View Single Post
Old 07-24-2008, 12:45 PM  
fallenmuffin
Confirmed User
 
fallenmuffin's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 8,170
Quick PHP solution I wrote for you.

Code:
<?php

/**
 * Link Sort 
 *
 * @author  Fallen Muffin Media <[email protected]>
 */

$filePath = 'links.txt';

$links = file($filePath);

foreach($links as $link) {
  $linkFrag = explode(' - ', $link);
  $descArray[] = array($linkFrag[1], $linkFrag[0]);
}

sort($descArray);

for ($i=0;$i<count($descArray);$i++) {
  echo '<a href='.$descArray[$i][1].'>'.$descArray[$i][0].'</a><br />';
}

?>
fallenmuffin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote