You could do it in a number of ways - one would be pagination, where you don't have a container, but something like the page listings here on the boards - shows 15 threads per page, then a Next Thread button.
You could also look into using AJAX. You'd be mixing Javascript and PHP to show the next set of images. You'd load the first nine with PHP, then a Javascript/AJAX link 'Next 9 Photos' would send a request to the PHP script, get the next nine, and update them without refreshing/redirecting the page. It's pretty slick, but utterly worthless if the user has Javascript disabled.
Flash could do it as well, but I don't like flash. 😃
I suppose you could also use hidden divs to load ALL the images, then use javascript to toggle the css display attribute for each element, but that would be considerably slow on page load, depending on the size of your images.
Pretty much you're going to have to go with Javascript (either AJAX or a toggling system of some sort) or use PHP pagination.