I cannot use the variables specified in controller in the corresponding view. Here is my code:
public function actionHelloWorld()
{
$this->render('helloWorld',array('var'=>'this is me'));
}
In the helloWorld.php (view file):
<h1>Hello, World!</h1>
<h3><?php echo $var; ?></h3>
It only prints out "Hello, World!", looks like $var is unaccessible in the view. Anyone?