Welcome Guest, Not a member yet? Register   Sign In
$data array becomes variables
#1

Am I understanding correctly?  I have seen controllers creating an array called $data with all the data needed by a view to do its job.  When the view is loaded, the elements of the array have been converted into variables.  For example, in a controller, I see:

PHP Code:
$data['product_code']='pc'

After a view is loaded, there is no array named $data, but there is a variable named $product_code, set to the same value as $data['product_code'].  

Is this something done by CodeIgniter?  
Reply


Messages In This Thread
$data array becomes variables - by danallen - 07-10-2017, 10:59 AM
RE: $data array becomes variables - by skunkbad - 07-10-2017, 12:03 PM
RE: $data array becomes variables - by Wouter60 - 07-10-2017, 12:03 PM
RE: $data array becomes variables - by InsiteFX - 07-10-2017, 05:48 PM
RE: $data array becomes variables - by danallen - 10-03-2017, 02:21 PM
RE: $data array becomes variables - by Tiffansy - 11-17-2017, 03:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB