This script takes any uri or segment from the url of the current page and assigns it to a $uri variable. It is very easy to implement so enjoy.
php
$uri = $_SERVER['REQUEST_URI'];
$pieces = explode("/", $uri);
$uri_3 = $pieces[3];
/php
Refferenses:
URI -Term used to collectively refer to URLs, URNs, and URCs.
lcweb2.loc.gov/ammem/techdocs/repository/gengloss.html
$_SERVER is an array containing information such as headers, paths, and script locations. http://php.net/manual/en/reserved.variables.server.php
explode() Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter. http://php.net/manual/en/function.explode.php

