<?php
//var to hold list location (substitute your own file name and text file)
$your_file = "/home/$clname/.cfgs";
//open the file
$read_your_file = @fopen($your_file, "r") or die ("Couldn't Access $your_file");
//create a variable to hold the contents of the file
$contents_your_file = fread($read_your_file, filesize($your_file));
//array of file contents
$your_array = explode("\n",$contents_your_file);
//close the file
fclose($read_your_file);
//counts the number elements in the property_categories array
$num_elmnts_array = count($your_array) ;
//elements in the drop down list
$drop_elmnts = 10;
//begin creating your dropdown menu...
$your_menu = "<select name=\"config\">";
//For loop to begin
for($counter = 0; $counter < $num_elmnts_array; $counter++){
$your_menu .= "<option value=\"$your_variable\">$your_array[$counter]
</option>";
$counter++;
}
//end select menu
$your_menu .= "</select>";
?>
contents of the .cfg file
server.cfg
blow.cfg
beerthirty.cfg
foo.cfg
foo.cfg
for some reason it only displays every othere one in the drop down menu.
so like server.cfg beerthirty.cfg and teh last foo.cfg display not the second or fourth