Jump to content

help with readdir


pooker

Recommended Posts

I am having problems with this script, I want it to open th directory, then read it and return only the the name and print it in a dropdown menu if it is a directory.

 

Code

 

<?php

$dir = opendir('./mangareader/');

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

if (is_dir($folder)) {

?>

<option value='1'><? echo $folder ?></option>

<? }

 

}

closedir($dir);

?>

 

 

 

the dropdown menu works and everything this is just the bare code for how i did the script

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/112003-help-with-readdir/
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.