I am thinking of adding an "Avatar Gallery" to my website for those who wish to not upload a personal photo.

From an HTML/CSS standpoint, how would I make it so that if my PHP grabbed 23 Avatars, that they would be displayed in a grid-like pattern? (e.g. 4 Rows of 5 Avatars, plus one Row of 3 Avatars)

I guess the key concept here, if that the number of Avatars would be dynamic, so that means my HTML/CSS needs to be more flexible!