[eluser]migdelmar[/eluser]
How come I can pass a 1 level multimensional array from controller to view, but when trying to pass a 2 level muldimensional array it fails?
Controller:
Code:
$multi[0]='banana';
$multi[1]='apple';
$multi[2]='grape';
$multi[3][0]='yellow';
$multi[3][1]='red';
$multi[3][2]='green';
$data['multi']=$multi;
$this->load->view('myview', $data);
But a print_r($multi) in View shows this:
Quote: Array
(
[0] => banana
[1] => apple
[2] => orange
[3] => Array
)
See array with index 3? It only says "Array" inside the view, and same print_r inside controller displays all data correctly, it seems as if it's only possible to pass a 1 level multidimensional array to views, any ideas?