Welcome Guest, Not a member yet? Register   Sign In
(newbie) multidimensional arrays and load->view
#1

[eluser]xjermx[/eluser]
Sorry for the newbie question-

I have the following code:

Code:
$data = array(
            
"ID" => array(0,1,2,3,4,5),
            
"First" => array('f1'=>'Bob','f2'=>'Joe','f3'=>'Mike','f4'=>'Nancy','f5'=>'Harry','f6'=>'Jane'),
            
"Last" => array('l1'=>'Barker','l2'=>'Jackson','l3'=>'Moran','l4'=>'Nibbler','l5'=>'Houdini','l6'=>'Jumper');
);

$this->load->view('myview', $data);

If I've understood correctly, the load->view "extracts" the data, and my multidimensional array becomes basically multiple (one dimension) arrays over in my view. Am I correct?

My second question then is if there's another or better way to move a multidimensional array from my controller/model to a view so that I can spit out its contents.

Thanks!


Messages In This Thread
(newbie) multidimensional arrays and load->view - by El Forum - 06-08-2010, 03:07 PM
(newbie) multidimensional arrays and load->view - by El Forum - 06-08-2010, 03:15 PM
(newbie) multidimensional arrays and load->view - by El Forum - 06-08-2010, 03:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB