SHOW:
|
|
- or go back to the newest paste.
1 | ||
2 | <?php | |
3 | //action in index controller | |
4 | ||
5 | public function indexAction() | |
6 | { | |
7 | //create a variable in the index action to be passed to the view | |
8 | $this->view->varName = 'some text'; | |
9 | } | |
10 | - | //html in index view |
10 | + | ?> |
11 | ||
12 | <!--html in index view--> | |
13 | ||
14 | - | <p>the value set in the controller for this view is <?php echo $this->varName; ?>.</p> |
14 | + | |
15 | ||
16 | <p>the value set in the controller for this view is <?php echo $this->varName; ?>.</p> | |
17 | ||
18 |