I'd imagine the page_height variable in php is merely being outputted within a css style (inline more than likely) for an element.
Though, if your content is exceeding 2000 pixels, they you might want to consider doing some sort of pagination so that you can access all of the data from the tables on multiple smaller pages. Or if you have some page code already, try shortening the amount of data per page.
But, if you want to keep your current code and output all to the same page, then yes, there is a better way. You say that your content is overflowing past the 2,000 pixel mark, if so, just get rid of the 2000px, or set it to auto, and the height of the container will adjust itself to the amount of content within it.