On Mon, Oct 27, 2008 at 10:04 PM, Ron Piggott <ron.php@xxxxxxxxxxxxxxxxxx> wrote: > I would like to parse the URLs in the values after the domain name. > > The URLs are the results of mod re-write statements. > > Example 1: > > http://www.domain.com/page/file/ > > The desired results would be: > $web_page_access[1] = "file" > > Example 2: > > http://www.domain.com/page/file/2/ > > The desired results would be: > $web_page_access[1] = "file" > $web_page_access[2] = "2" > > Any help please? > > Ron > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > // $uri = htmlspecialchars($SERVER['REQUEST_URI'], ENT_QUOTES, 'UTF-8'); $uri = htmlspecialchars('/page/file/2/', ENT_QUOTES, 'UTF-8');; $uri = trim($uri, "/"); $parts = explode("/", $uri); var_dump($parts); or use parse_url to get down to the bits you need. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php