ho usato foreach() dopo aver ordinato i file con scandir(). grazie Thunderbird