Appreciate the help.
I'm trying to append values to an array, instead of just printing them in sequence to the screen, I'd rather loop through them and append them to an array, because after I loop through and append, I want to sort, and display alpha listing in a select box. So far here is the code to loop through and print.
while ($loc = readdir($loc_dir)) {
if ( ($loc != "root") && ($loc != ".") && ($loc != "..") ) {
//echo (" <OPTION value=\"".$loc."\">".str_replace("_", " ", $loc)."</OPTION>\n");
}
}
}
I'm assuming that after I loop through, and append to an array ( $listings ) I can run this code ( thanks ben ) to sort, and display in alpha listing in a select box, correct? Also I'm open to better suggestions of how to model the code.
sort($listings);
do
{
echo ("<option> " . current($listings) . "\n");
}
While (next($listings));