Creating a PHP MVC framework - Part 4
Hello! And welcome to the fourth part of the PHP MVC tutorial, in this part we’ll dive onto the V in MVC, the View.
If you haven’t already, you should read the other parts before this one
The view is in charge of displaying data to the user, it dictates how the data must be shaped, in the web world, the view is generated HTML code.
There are many ways to generate HTML code, the one we were using so far it was the simplest in the PHP world, just embedded PHP, as I specified earlier, the problem with this approach was giving the view layer a bit too much power, making it easy to do some things that should not be done in the view, and should be performed in the controller instead, on the other hand, the advantage is that embedded PHP has no learning curve, as every developer already knows it.