MEM
MEM

Reputation: 31407

Zend Newbie Question - How to pass info from Controller Action into View?

On my controller I have the following Action:

public function indexAction()
{

  $teamDao = new TeamsDao();
  return $teamDao->showName(3);

}

So, I'm returning this team name, and my question is, how can I display this team name on the view ?

Thanks a lot, MEM

Upvotes: 1

Views: 108

Answers (1)

Byron Whitlock
Byron Whitlock

Reputation: 53919

Put this in your controller:

$this->view->teamName = $teamDoa->showName(3); 

And this in your view

<?php echo $this->teamName?>

Upvotes: 3

Related Questions