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

后端 未结 9 937
梦毁少年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:30

    If you can, use a template engine instead.

    Although it is slightly easier at first to mix your HTML and PHP, separating them makes things much easier to maintain later on.

    I would recommend checking out TemplateLite which is based on Smarty but is a little more light weight.

提交回复
热议问题