Published On Jun. 30th 2016

The PHP Practitioner: Step 5: Separate PHP Logic From Presentation

Episode 5 Run Time 3:46


We'll touch on a slightly higher level topic in this episode, but only lightly. If you stick with it long enough, you'll begin to hear the phrase "separation of concerns." At our current skill level, this means we should give consideration to the fact that, at the moment, our PHP logic and HTML presentation are a bit too intertwined. Perhaps we can separate these concerns.

Step 5 Homework: Play around with creating a new file, preparing a few variables, and then loading a separate "view" file to present the HTML.