A better way of doing layouts in PHP