<?php $url = 'http://www.example.de/dashboard/2/'; $path = parse_url($url, PHP_URL_PATH); $parts = explode('/', $path); $section = $parts[1]; // "dashboard" $ending = $parts[2]; // "2" echo $section, '/', $ending;
You have javascript disabled. You will not be able to edit any code.