I have the code below that outputs the names of files in a directory. I'd like to separate the file names alphabetically by an additional line space when the first letter of the file changes (say from A to B). Any ideas? Thanks.
$dirs = scandir("Dir");
foreach($dirs as $file)
{
if (($file == '.')||($file == '..'))
{
}
elseif (is_dir($tdir.'/'.$file))
{
filesInDir($tdir.'/'.$file);
}
else
{
echo $file."<br>";
}
}