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
Post a Comment