I am new to php frameworks, it is said that php frameworks provide reusable code, more than code written in flat php, but in most php frameworks we write code in 3 sections like models, views, controller etc.
How that code is reusable, in another projects?
In flat php, we write code in one function and we can use it anywhere.

Edited 8 Months Ago by panduranga_1

You need to study object-oriented design and development a LOT more before you can deal with this. Consider PHP to be C++ for web programming. In any case, the answer to your question would require a 500 page book to cover in detail... :-(

In addition: check also about composer, it's a dependency manager for PHP, most frameworks support it and it allows to easily share and include libraries into a project:

However you don't really need to use a framework to take advantage of composer, you can use flat PHP. A part that a framework can be useful because it provides a defined and tested structure.

Frame work is easy to understand codes.how you created ..and MVC frame work having inbuilt library and helpers functions,you can save your time by just calling the functions, .but you should aware about OOPs concepts.and reusable is depends on projects..i mean CRUD operation is same means you can just dump that code to your another projects..

This question has already been answered. Start a new discussion instead.