I'm trying to sort values in php. I realize its very simple to sort in SQL, and it appears simple to sort in php.
I realize the sort function works fine, for example:
<?
$listings = array("joe", "jim", "bob", "dave", "ron");
sort($listings);
echo$listings[3];
?>
But how do I display the results, in alpha listing.
For example, if I had a select box on my web form, how would I put those values in the select box, in alpha order. I'm grabbing the directory names as the values I wish to work with, and I had thought I could loop through the array til no value exists displaying all the names in alpha order in the input box? Am I way off?
Thanks for the help.