Page 1 of 1

Re: Passing variables from controller to view

Posted: Tue Sep 11, 2012 7:43 am
by Jeroen
You set the variable AFTER you do the output

Code: Select all

 public function addresses($arg = false) 
 {
        echo'Addresses '.$arg.'<br />'; //Why output in your controller?
         $this->view->showAddresses = $this->model->getAddresses();  //Where is this method in your code? And you better create a method to set "showAddress" instead of using a public variable.
        $this->view->render('addressesView');

       
 }

Re: Passing variables from controller to view

Posted: Thu Sep 13, 2012 11:51 pm
by Acesystech