$Addr = trim($_SERVER['REQUEST_URI'], '/'); if ($Addr != '') $Addr = explode('/', $Addr); else $Addr = array(); print_r($Addr);