How to get the second segment in URL without slashes ? For example I have a URL`s like this
http://foobar/first/second
How to get the valu
$segments = explode('/', trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/'));