foreach (glob('*') as $fname) {
echo basename($fname, '.' . pathinfo($fname, PATHINFO_EXTENSION)) .'<br />';
}
foreach (glob('*') as $fname) {
echo basename($fname, '.' . pathinfo($fname, PATHINFO_EXTENSION)) .'<br />';
}
print_r(array_diff(scandir('.'), ['.', '..', '.htaccess']));