PHP Class for generating tables