Generate HTML elements using PHP