Even your vague ideas about the design of the gallery are not good enough to start doing this project.
For example, fixed number of images on row is really bad, it would assume fixed size of a browser window which is ridiculous — this is not what happens in real life on the client side. Some (many) use the mobile devices. Any provisions of thumbnail? Without those you cannot make a gallery convenient, not even close. How about different viewing options? Smaller size, actual size, "real pixel"? Zoom? (This can be considered as too advanced.)
Even though you can easily make a gallery using only server-side programming (PHP), it's usually either too static or too slow without some client-side programming using JavaScript (but if your requirements are modest, you need only a bit of client-side programming. I find jQuery extremely helpful.
Now, you can find tons of projects to use for samples or just to learn some techniques:
http://lmgtfy.com/?q=gallery+PHP[
^]
or may be
http://lmgtfy.com/?q=gallery+PHP+(JavaScript+OR+jQuery)[
^].
—SA