When do I use if/endif versus If{}?

后端 未结 6 821
暗喜
暗喜 2021-02-08 08:30

Well the question is self explanatory.

In PHP when do I use the if/endif notation instead of the standard if(something){} notation?

Exa

6条回答
  •  庸人自扰
    2021-02-08 09:00

    Both methods are acceptable. Some people maintain that the alternative syntax (endif) is more legible in templates. IMHO, with a modern syntax coloring/highlighting error, that no longer holds true. Just pick a style and stick with it.

提交回复
热议问题