Jump to content

select folder with <option> on server...


djpaul

Recommended Posts

hay guys,

I'm busy with an experiment but i can't get is worked.

I have this problem with th array that;s been created (explode) but i only have the index of 0.

 

this is my script so far...

 

<? echo "<select name=\"selecteer folder\" size=\"1\" >";

$dir = ".";

$dp = opendir ($dir);

while ($folder = readdir($dp)){

if((is_dir($folder)) AND (substr($folder,0,1)!='.')){

$folders = explode (' ', $folder);

foreach ($folders as $index => $map){

echo "<option value=\"$index\">$map</option>";

echo "</select>";

$aantal = count ($folders); //For showing how many folders there are...(later use)

}

}

}

?>

 

Gr Paul

Link to comment
https://forums.phpfreaks.com/topic/37221-select-folder-with-on-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.