开发者

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

开发者 https://www.devze.com 2023-01-23 05:44 出处:网络
On my controller I have the following Action: public function indexAction() { $teamDao = new TeamsDao();开发者_运维百科

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


Put this in your controller:

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

And this in your view

<?php echo $this->teamName?>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号