[eluser]ICEcoffee[/eluser]
Hi all, I know this is probably simple, but I'm just getting to grips with PHP OOP/MVC.
I know and have successfully written code to pass associative array data to a view in Codeigniter ie:
Controller:
Code:
$data['name'] = "Harry";
$data['country'] = "UK";
$this->load->view('profile');
Then in the view file:
Code:
<?php echo $name; echo $country?>
but how do I echo an indexed array? where the array in the controller is:
Code:
$data = array(1=>, "Harry", "Country");
I want to produce a menu list, so I don't want to use pass an associated array?
Any help please?