Re: [PHP] Parsing URLs

2008-10-28 Thread Yeti
One could also abuse basename and pathinfo. Works in PHP4+ http://www.domain.com/page/file/'; $pathinfo = pathinfo($uri); $webpageaccess = array(); $webpageaccess[1] = $webpageaccess[2] = ''; if (isset($pathinfo['basename'])) $webpageaccess[1] = $pathinfo['basename']; if (isset($pathinfo['dirname'

Re: [PHP] Parsing URLs

2008-10-27 Thread Eric Butera
On Mon, Oct 27, 2008 at 10:04 PM, Ron Piggott <[EMAIL PROTECTED]> 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_a

[PHP] Parsing URLs

2008-10-27 Thread Ron Piggott
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 resu