1
I’m not sure how in this case to play the values in the project view, follow the code:
public function indexAction()
{
$actor = new Application_Model_Actor();
$resultadoActores = $actor->listarAtor();
foreach($resultadoActores as $ator)
{
$idActor = $ator->actor_id;
$film_actor = new Application_Model_FilmActor();
$resultadoFilmeAtores = $film_actor->listarFilmeActorId($idActor);
foreach ($resultadoFilmeAtores as $filmeAtor)
{
$idFilm = $filmeAtor->film_id;
$film = new Application_Model_Film();
$resultadoFilmes = $film->listarFilmeId($idFilm);
foreach ($resultadoFilmes as $filme)
{
echo $ator->first_name . " " . $filme->title . "<br/>"; // <-- Esse resultado na view?
}
}
}
}
I tried to do something like: $this->view->movies = $resultadoFilmes; and inside the controller view create the foreach and assign the values, but unsuccessfully too.