How to make dynamic breadcrum using segments

<?php // This function will take $_SERVER[‘REQUEST_URI’] and build a breadcrumb based on the user’s current path function getBreadcrumbs($separator = ‘ &raquo; ‘, $home = ‘Home’) { // This gets the REQUEST_URI (/path/to/file.php), splits the string (using ‘/’) into an array, $current_segments = explode(‘/’, parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH)); //filters out any empty value $path = array_filter($current_segments); Bc … Read moreHow to make dynamic breadcrum using segments