- We know that, A view is always responsible for displaying the data.
- A view Always knows how to display the data beautifully, but it does not know what to display
- By default a view will never get the data directly from database.
- By using controllers, we can pass data to views
- Data is passed from the controller to the view by way of an array in the second parameter of the view function.
echo view(" view_name ",$data)
Тэги:
#control_structures #template_engine #view_components #data_iteration