[eluser]carvingCode[/eluser]
Thanks. Indeed a simpler way.
I made a slight modification to handle a 'controller/function' type of menu call.
Code:
function show_menu($data_array, $first_uri_segment, $second_uri_segment) {
foreach ($data_array as $key => $val) {
if ($second_uri_segment == $key) {
echo "<li>" . $val . "</li>";
} else {
echo "<li>" . anchor($first_uri_segment . "/" . $key, $val) . "</li>";
}
}
}
$this->cc_functions->show_menu($data, $this->uri->segment(1), $this->uri->segment(2));
I placed the function in a custom library in my project, hence the 'cc_functions' in the function call statement.
Thanks!
Randy