trying to show a variable in my layout

Posted by user1400 on Stack Overflow See other posts from Stack Overflow or by user1400
Published on 2010-03-30T09:41:08Z Indexed on 2010/03/30 9:43 UTC
Read the original article Hit count: 140

Filed under:

hi i have a simple question

where is my code wrong ?

in index controller and index action

i put

$this->view->username="user1";

and when i try in my layout i use

echo $this->username;

i got fllowing error or null value

Notice: Trying to get property of non-object in D:\Zend\Apache2\htdocs\test\application\layouts\layout.phtml on line 115

thanks

© Stack Overflow or respective owner

Related posts about zend-framework