I\'m trying to use use $current_url = basename($_SERVER[\'PHP_SELF\']); to determine which page I am on, considering my navigation (html) is stored in a php fil
You could also use preg_replace() to add class="active"
ob_start();
echo '';
$output = ob_get_clean();
$pattern = '~- ~';
$replacement = '
- ';
echo preg_replace($pattern, $replacement, $output);