I am new to PHP. I am developing an application using MVC
in PHP. I think I still have some questions roaming around my head about MVC.
In MVC
(please correct me if I'm wrong), MODEL
will have the data(or gets the data from DB
) and VIEW
will display it. My MODEL
classes read data from the DB
and I need to display that data in the VIEW
.
My question is, how can I do that??
How can MODEL
(which is in PHP) pass the data to the VIEW
(which is in HTML
) and how can I apply the CSS
styles to that data.
For Example : The user searches for a patient, Controller
will take the patient_id
from the user and passes it to the MODEL
, MODEL
then, get the details from the DB
. now, how can MODEL
present these details in a pretty table format in the VIEW
?