PHP; read picture folders, sort them into sets and output them with a loop | Hacker News Reader