theniteowl
Programmer
Hi All,
I need to parse out a path like:
/myfolder/folder2/file.php
I need to separate this out into the sub pieces and not quite sure how to approach it in PHP.
Is there a command similar to the Javascript split() so I can create an array splitting elements at the /?
I need to identify the first and second folder names to determine how the navigation control displays.
I cannot use parse_url as it does not work well with relative paths and because the value of the path is passed in via an htaccess file as a parameter on the querystring, not as the original URL/URI.
I know how I would do this in Javascript but do not know the commands available in PHP well enough yet to know what a comparable command might be.
Thanks.
At my age I still learn something new every day, but I forget two others.
I need to parse out a path like:
/myfolder/folder2/file.php
I need to separate this out into the sub pieces and not quite sure how to approach it in PHP.
Is there a command similar to the Javascript split() so I can create an array splitting elements at the /?
I need to identify the first and second folder names to determine how the navigation control displays.
I cannot use parse_url as it does not work well with relative paths and because the value of the path is passed in via an htaccess file as a parameter on the querystring, not as the original URL/URI.
I know how I would do this in Javascript but do not know the commands available in PHP well enough yet to know what a comparable command might be.
Thanks.
At my age I still learn something new every day, but I forget two others.