I have a script that enters data into a text file and then pulls it out to display it. For example I have two guys names, Dave and peter. in the text file Dave is on the first line and peter is second. When I call the function with,
function showlinks() {
global $filename;
$html = implode(array_reverse(file($filename)));
print $html;
}
It displays them on the page as Peter first then Dave second. I don't know that much php so to change it so that it will sort it the other way I have no clue how to do. If anyone can help I would greatly appreciate it. Thanks in advance.
sorting problem
Moderator: General Moderators
-
Canabalooza
- Forum Newbie
- Posts: 5
- Joined: Sat Aug 09, 2003 11:08 am