What is the best practice to use when using PHP and HTML?

后端 未结 9 934
梦毁少年i
梦毁少年i 2020-11-30 04:52

I have been designing websites for a while now, but there is one thing that I have never been quite sure of when using PHP and HTML. Is it better to have the whole document

9条回答
  •  死守一世寂寞
    2020-11-30 05:36

    It depends on the context. If you are outputting a lot of HTML with attributes, you're going to get sick of escaping the quotation marks in PHP strings. However, there is no need to use ?>

    instead of echo "

    "; either. It's really just a matter of personal taste.

提交回复
热议问题