On Thu, February 7, 2008 12:30 pm, Steve Marquez wrote: > Greetings, > > Could someone please point me in the right direction? I am trying to > have > PHP find out if a directory has files in it and then if it does, > display and > include, if it does not, then not display the include. > > I have looked at the Manual and did not really know where to look. http://php.net/opendir http://php.net/readdir <?php $dir = opendir("/full/path/to/the/dir/please") or die("No such dir."); while (($f = readdir($dir)) !== false){ echo "$f<br />"; include $f; } ?> -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php