[eluser]agartzia[/eluser]
Hi there! I've just discovered CI and I think it's amazing!
I need to loop inside a template all along the array. The structure is as shown:
Code:
$data[0][id] = 1
$data[0][name] = John Doe
$data[0][details][address] = Fake Str. 123
$data[0][details][phone] = 555-123456
$data[0][last] = 2801002101
$data[1][id] = 1
$data[1][name] = Martin Perry
$data[1][details][address] = Lied Str. 321
$data[1][details][phone] = 555-1654862
$data[1][last] = 28023323421
And so on...
The problem would be solved if I could iterate the array, but CI gives me the keys instead of the array itself, which is not very useful for me.
I've thought I might add a key...
Code:
$this->load->view('body', array('main_data' => $data));
...but I don't think it's a proper way to solve it.
Is there a way to access the $data itself?
Thanks! Keep it on!