I like a lot what you've done ^. I think this is another place where you want to move away from HTML/PHP welding to a simple PHP and its echo.