HTML to PHP or vice versa?

Question:

I am generating a website page using information from a database. Initially, I created a template and trial versions of the front-end and when the design was finally ready it was time for the server component. Here I have a question.

What would be more correct to do: rename index.html to index.php and insert into it the necessary dynamically generated modules or vice versa, that is, index.php will contain only inserts of modules, in which both design and generation will be mixed content? The question is not only which is better, but why?

I never understood how to maintain the structure of a website and I constantly had some kind of mixing of styles that led to the fact that I was already lost in the structure of the project. It's time to figure it out.

Answer:

Hello. I would highly recommend that you familiarize yourself with such a design pattern as MVC: http://ruseller.com/lessons.php?id=666 It is on it that most modern frameworks are built. If you figure it out, it will become much easier for you to create websites, and it will be much easier to master any framework. If you are friends with English, here is a link to a foreign source:

Scroll to Top