Jochem -
The problem is the sort()! I did not realize that it replaces the key
with an integer. Instead, I should have used ksort().
$dir = opendir($doc_dir);
while (false !== ($file = readdir($dir))) {
if (($file != ".") && ($file != ".."))
$file_list[$file] = $file;
Todd Cary wrote:
I am using an array to populate a drop-down and I would like to have the
same value in the key as the value. Using the following, the key is
0,1,2,3...etc. How can I correct that?
what is there to correct - you are telling me that the value of $file
show up as a string and the
2 matches
Mail list logo