Hi,
I was wondering how to pass and display multiple objects from the controller to the view…
Like if I wanted to send different types of objects to the view??
Hoping I’m asking this correctly…
Example (from another framework)
Controller —>
function index(){
$this->set(‘person’,$PersonObj);
$this->set(‘car’,$CarObj);
$this->set(‘homes’,$HomeArray);
}
View---->
(now in the view you could access the data like this…)
echo ($person->eye_color);
echo ($car->car_color);
echo (count($homes));
How might I do something like this in YII?
Many thanks,
Bryan