Hello Guys,
This is more of a basic php question than a joomla quesion, but maybe others on here will find it usefull.
I'm working on a mod, I want the main page to list all of the folders with in a default folder, I have this working with this code:
Code:
<?php
$scanthis = '.';
$scanlisting = scandir($scanthis);
$dirlisting = array();
foreach($scanlisting as $key => $value){
if (is_dir("$scanthis/$value") == true && $value != '.' && $value != '..'){
$dirlisting[] = $value;
}
}
foreach($dirlisting as $key => $value){
print('<li><a href="' . $scanthis . '/' . $value . '">' . $value . "</a></li>");
}
?>
I need the above code to ignore folders that start with a underscore?