I have a problem I encountered today.
I want to have 2 certain values in my dropdownbox, one that decides the value and one value that decides the name, but there is a problem, the certain value is not in an array but rather it reas a directory:
[php]if ($handle = opendir(checkSlash($config[‘path_demos’])))
while (false !== ($file = readdir($handle)))
if ($file != “.” && $file != “…”)
if (strpos($file, “.exe”) !== FALSE)
$file = substr($file, 0,strrpos($file,’.’));
$demo_count = $file;
When that has happened I put it in a array:
$demo_count => ‘Easyvoras’,
$demo_count => ‘Easypos’);[/php]
After that I try to make the option:
[php]foreach($demo_count as $demo_option => $names_dropdown)
But the “$demo_option” always returns as a number not a name!
With kind regards,
Jelle van Lanen