How to render variable of if-else block in Yii -


i new in yii.i have if-else block in action , need render value of variable. showing error "undefined variable". how can done??

please help. in advance!!

first declare variable before if else statement,
change variable's value per if else statment
pass variable render. suppose variable name $model, render code

$this->render('index.php', array('model' => $model)); 

in view, can access variable $model variable name.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -