Advertisement
gareth126

Untitled

Nov 14th, 2011
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <?php
  3. //action in index controller
  4.  
  5. public function indexAction()
  6.     {
  7.         //create a variable in the index action to be passed to the view
  8.         $this->view->varName = 'some text';
  9.     }
  10. ?>
  11.  
  12. <!--html in index view-->
  13.  
  14. <h1>Welcome to the <span id="zf-name">Zend Framework!</span></h1>
  15.    
  16. <p>the value set in the controller for this view is <?php echo $this->varName; ?>.</p>
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement