Splitting results into multiple pages is called "pagination ". It's a fairly popular topic for new PHP developers so there has been a LOT written about it in the past. - I suggest you try a simple Google search for that phrase coupled with "PHP". That should get you started.
As for reading directories, try the glob or opendir functions.
Comment