I still can't really wrap my head around the built in DOMDocument class.
Why should I use that instead of just doing it similar to the following?
I would like to know the benefits.
$URI = $_SERVER['REQUEST_URI'];
$navArr = Config::get('navigation');
$navigation = '<ul id="nav">' . "\n";
foreach($navArr as $name => $path) {
$navigation .= ' <li' . ((in_array($URI, $path)) ? ' class="active"' : false) . '><a href="' . $path[1] . '">' . $name . '</a></li>' . "\n";
}
$navigation .= '</ul>' . "\n\n";
return $navigation;