Difference between static web pages and dynamic web pages with PHP
Static or "flat" web pages are those in which the information is presented in a predefined form and without changes. There is no way you can change the content of the page.
The information contained in a static page can be given a certain presentation format, as well as include images, links to other pages, animations, videos, sounds, etc. In general, everything is done through HTML tags and this is the only thing that can be offered through this type of pages.
In the early days of the Internet static pages predominated, but with the passage of time and the need to streamline the handling of information, a new concept of web pages emerges that today stands out and is the most used. These are called Dynamic website: within the dynamic programming for web pages, there are different languages, with PHP being one of the most used.
Normally, static pages are composed of HTML code. When the page (file) is requested by the browser, the server sends it and does not perform any other operation. All visitors will see the same content.
About dynamic pages
Dynamic web pages are those in which the information they present is generated from some action or request of the user on the page or by queries to the content of databases that normally change frequently. Contrary to static pages, where their content is predetermined, in the dynamics, the information appears immediately after a request made by the user or a query to databases.
PHP dynamic website programming has multiple applications, among which we can mention forums systems (messages, images, etc. are stored in databases). Another application is that the user has the ability to change the design and content of a page, such as the personalized Google homepage, as they are stored in a database.