title: Yii pass variable from controller to view not working
body: <p>I want to pass variable from controller to view but it doesn't working ...</p>
  
  <p><strong>In Controller</strong></p>
  
  <pre><code>    class RegisterController extends Controller
  {
      public function actionRegisterPage() 
      {
          // This function I have put it on url manager.
          // And I tried at here worked fine
          $util = new Utility();              
          $util-&gt;detectMobileBrowser();   
          $util-&gt;checkWebSiteLanguageInCookies(); 
          $this-&gt;layout = "masterLayout";
          $this-&gt;render('index');
      }
      public function actionSignIn(){
  
          if(blablabla){
              // Here is for me to display certain message, so I pass wish to pass $ERROR_USERNAME_INVALID to View
             $ERROR_USERNAME_INVALID = "ERROR_USERNAME_INVALID";
  
             $this-&gt;render('index',array('ERROR_USERNAME_INVALID'=&gt;$ERROR_USERNAME_INVALID));
          }
      }
  
  }
  </code></pre>
  
  <p><strong>In View</strong></p>
  
  <pre><code>&lt;?php echo $ERROR_USERNAME_INVALID; ?&gt;
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <p>Undefined variable: ERROR_USERNAME_INVALID </p>
  
  <p>Also tried declare in Controller <code>public $ERROR_USERNAME_INVALID = "ERROR_USERNAME_INVALID";</code> and <code>echo</code> in View ... still <strong>Undefined variable: ERROR_USERNAME_INVALID</strong></p>
  
  <p>Any Suggestion to do pass variable to view ? Thanks</p>