Passing variables from controller to view

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 40
Joined: Fri Aug 10, 2012 4:37 pm

Tue Sep 11, 2012 7:43 am

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.


New php-forum User
New php-forum User
Posts: 35
Joined: Mon Aug 20, 2012 10:27 pm
Location: Ernakulam

Thu Sep 13, 2012 11:51 pm

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests