Welcome Guest, Not a member yet? Register   Sign In
Need Help for accessing array in view files

Hi i am having trouble while accessing array in view file.
Can any one help me out?? I have define one array in view file and i want to access it in my function but it will give me Fatal error: Using $this when not in object context.
Here is my view code.

$menu_array = array();
foreach ($category as $rowdata)

$this->menu_array[$rowdata->category_id] = array(
'id' => $rowdata->category_id,
'category' => $rowdata->category_master_name,
'parent_id' => $rowdata->category_parent_id);
function generate_menu($parent)


Theme © iAndrew 2016 - Forum software by © MyBB