Hello guys,
I'm busy with an photogallery and i wanted to implent this script i wrote to select a folder and put there the photo's in.
But i only get 1 folder in the drop-down menu and the other is standing next to it.
If i do print_r ($folders); then the folders are side by side and the array has only index[0].
Anybody an idea?
this is my script:
[PHP]<? echo "<select name=\"selectee r folder\" size=\"1\" >";
$dir = ".";
$dp = opendir ($dir);
while ($folder = readdir($dp)){
if((is_dir($fol der)) 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)
}
}
}
?>[/PHP]
Gr Paul
I'm busy with an photogallery and i wanted to implent this script i wrote to select a folder and put there the photo's in.
But i only get 1 folder in the drop-down menu and the other is standing next to it.
If i do print_r ($folders); then the folders are side by side and the array has only index[0].
Anybody an idea?
this is my script:
[PHP]<? echo "<select name=\"selectee r folder\" size=\"1\" >";
$dir = ".";
$dp = opendir ($dir);
while ($folder = readdir($dp)){
if((is_dir($fol der)) 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)
}
}
}
?>[/PHP]
Gr Paul
Comment