![]() |
Variable Scope - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12) +--- Thread: Variable Scope (/showthread.php?tid=65110) |
Variable Scope - paulkd - 04-30-2016 Hi, Can someone confirm that variables passed to a top view are available to a lower-down view? e.g. PHP Code: $this->load->view('view1', $view1array); If I have a variable $test1 in $view1array, it will be available in view2? If this is the case, is there a way/method to isolate the variables in $view1array from view2? RE: Variable Scope - InsiteFX - 04-30-2016 The CI Loader handles the variables in the view: PHP Code: /** |