Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php // \controllers\UserController.php
- ...
- private function viewAction($var = null) {
- $var = $var? $var: 'user';
- $this->render($var);
- }
- public function usersAction() {
- $list = array('Bob', 'Steve', 'Mike', 'Sally', 'Frank');
- $this->view->userlist = $list; //array('Bob', 'Steve', 'Mike', 'Sally', 'Frank');
- $this->viewAction();
- }
- ... ?>
- // \views\scripts\user\user.phtml
- ...
- <h1>User List</h1>
- <?php
- /*$list = array('Bob', 'Steve', 'Mike', 'Sally', 'Frank');
- echo $this->htmlList($list);*/ // this works
- var_dump($this->userlist); // this does NOT work
- //echo $this->htmlList($this->userlist);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement