Zend Framework Forum

Go Back   Zend Framework Forum > Zend Framework Forum > Announcements

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-06-2009, 10:42 AM
Junior Member
 
Join Date: Jun 2009
Posts: 1
Default returning the value of a variable from controller to form or model..

hi everybody
actually i am new to zend framework. I know that i can return a value of a variable from a form to the controller. Can I also return a value from the controller to any form or any model? If this is possible then please tell me that how can we do it.

Thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-12-2009, 05:21 AM
Senior Member
 
Join Date: Jan 2008
Location: chicago
Posts: 107
Default

Well you can pass a variable from the Controller to the View:

In the Controller:
$this->view->foobar = "this is a string";


In the corresponding View:
<h1><?= $this->foobar ?></h1>

will get you:
<h1>this is a string</h1>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT. The time now is 12:16 PM.


Designed by: Miner Skinz Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0