daveh / php-mvc

A simple PHP model-view-controller framework, built step-by-step as part of the "Write PHP like a pro: build an MVC framework from scratch" course on Udemy.
https://davehollingworth.com/go/phpmvc/
MIT License
782 stars 311 forks source link

Passing PDO results to html views #124

Open devgodstudio opened 1 year ago

devgodstudio commented 1 year ago

How would I pass a array of lets say for example news posts from a controller to a view? how would I display it for each post?

daveh commented 1 year ago

Please see the documentation here.