pass the variable to child view in zend -
pass the variable to child view in zend -
i using zend framwork in controller have set string display in view
controller
$this->view->foo = 'sample string or content';
main view
echo $this->foo;
this working fine show me string sample string or contentbut when phone call other view within main view not give output
i caaling view within view.
<?=$this->myform;?>
in myform.phtml
echo $this->foo;
this not given output... please help me going worng... thanks
use partial helper this:
in view:
<?php echo $this->partial('myform.phtml', array('foo' => $this->foo)); ?>
zend-framework
Comments
Post a Comment