View Single Post
Old 01-16-2008, 10:02 AM   #18 (permalink)
EyeDentify
The Acquainted
 
EyeDentify's Avatar
 
Join Date: Nov 2007
Location: Sweden
Posts: 106
Thanks: 13
EyeDentify is on a distinguished road
Smile

Hey i just had to put my little contribution to the tread.

I borrowed some of WildHoneys code (sorry about that :) ).

php Code:
$path = '../categories/';
$path_len = strlen($path);

foreach(glob($path . '*', GLOB_ONLYDIR) as $dir) {
   
$dir = substr($dir, 0, -$path_len);
echo '<option value='.$dir.'>'.$dir.'</option>';

}

My hopes is that going this way the lenght of the path would be recognized and cut of from the $dir variable.

I was unsure about the last two parameters in substr() at time of writing this quickly, but i think you get the idea.

/EyeDentify
__________________
Of course the whole point of a doomsday machine, would have been lost if you keep it a secret.
EyeDentify is offline  
Reply With Quote