json
json

Reputation: 21

How to pass value from controller to view

i want to pass a variable to view file. i am using the following code:

View::factory('admin/modules/video_category')->set($x, $parent_id);

to pass value of $parent_id to $x but $x variable is showing null. please advise how to do this correctly.

Upvotes: 1

Views: 1416

Answers (1)

Kemo
Kemo

Reputation: 7042

View::factory('some_view')->set('variable_name', $value);

and than in the view, you can call $variable_name.

Upvotes: 2

Related Questions