Any way to combine both forms of url parsing?
I want to use standard slash notation for navigation ,but also account for
the occasional variable used within a single page.
e.g. URL can be either:
domain.com/index.php/main/index.html?ii=1
or:
domain.com/index.php/main/index.html?ii=1
if (isset($ii) // how do I grab value and truncate $REQUEST_URI
$path_array = explode('/', $REQUEST_URI);
$page_name = array_pop($path_array); //get page name from end of array
$page_type = array_pop($path_array); //get page type from next item
best regards,
jaxon
On 3/23/01 9:09 PM, "Aaron Tuller" <[EMAIL PROTECTED]> wrote:
> super easy.
>
> $path_array = explode('/', $REQUEST_URI);
> $numPathElements = count($path_array);
>
> then loop through the elements and do what you need, you might need
> to use strtok() if you're expecting slashes in your arguments.
>
> -aaron
>
> At 8:58 PM -0500 3/23/01, Jaxon wrote:
>> how about parsing a url from passing variables like :
>> test.php/op/3/op2/6/pagename.html
>>
>> cannot this be parsed, to let search engines spider past the "?" properly?
>>
>> regards,
>> jaxon
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]