Re: A few questions...
| From: | Jaxon | Date: | Sun, 25 Mar 2001 23:31:42 +0000 |
| Subject: | Re: A few questions... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45537@lists.php.net to get a copy of this message | ||
Chris,
> I think I just slightly unsure of how that explode() function works in this
> situation...could you clarify further?
>
>>
>> $path_array = explode('/', $REQUEST_URI);
>>
>> $last_item = array_pop($path_array);
>> $next_to_last_item = array_pop($path_array); / item
>>
$REQUEST_URI contains the non-domin path (the URI) - it's a predefined
variable like $PHP_SELF, etc
http://www.php.net/manual/en/language.variables.predefined.php
in this explode() example, the '/' is the devider, so if you have
http://www.somedomain.com/dir1/dir2/dir3/somepage3.php
The URI is: /dir1/dir2/dir3/somepage3.php
and 'exploding' divides that into array elements (dir1, dir2, dir3,
somepage.php)
regards,
jaxon