This not only applies to php, it applies to coding in general. The framework will help you organize the mess, but if you are new to programming, the platform will organize your messy code.
Some basic ideas to keep in mind, in addition to studying computer science (which I recommend if you are serious about coding), should make your code modular.
For example, and this is a simple example showing a point. If you have a website that generates an html table containing financial data.
(Here are some scenarios on how to do this ...)
, financialdata.php, 1 N, (, ),
html.
, financialData2.php, , yuor ( ), . financialData2.php.
, financialData3.php, financialData2.php yoru. html , . , , financialData3.php , , .
: , . , , , .
-, , , . , . . ( ). - , -. , , getData .
/ , , , , , - , BS CSE, .