PHP Devs: Do You Still Inline Your HTML?

PHP Devs: Do You Still Inline Your HTML?

PHP

I’m surprised whenever I look at recently written PHP and see folks are still writing their HTML inline with their code. Perhaps it’s because so many PHP tutorials teach this style, or maybe people just aren’t aware of the advantages of separating it out. If you still write this way, feel free to comment on why. I’ll try to explain the advantages of separating it out here. I won’t get into the details of Model-View-Controller programming here, see that Wikipedia article or a blog post I will probably eventually do about it. But for now I will just plead that you separate out your display HTML from your functional PHP code.

Continue Reading
Article By:

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. For more information about cookies, see our Privacy Policy.