Page 1 of 1

you are here

Posted: Thu Jun 26, 2008 3:20 pm
by nelsok
I want to be able to break a part the output from $_SERVER['REQUEST_URI'] so that

http://domain.tld/database/category/food/index.php

will return

$top_level = database
$second_level = category
$third_level = food

any ideas?

Thanks.

Re: you are here

Posted: Thu Jun 26, 2008 5:55 pm
by Weirdan

Code: Select all

 
list(,,,$top_level, $second_level, $third_level) = explode('/', $_SERVER['REQUEST_URI']);