how do i pass a multi diminutional array to a view? controller code
public function index(){
data['navs'] = array(
'name' => array('one', 'two', 'three'),
'link' => array('one', 'two', 'three'));
$this->load->view('adminView', $data);}
view code
<?php if ($navs) {
foreach ($navs as $nav) {
echo('<li><a href="' . $nav->link . '">' . $nav->name . '</a></li>');
}
}?>