PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and scroll up a bit. Find the part about data handling and try arg_separator.input
Set it to use "/" as a separator. That should cause $_GET['category'] to be equal to the number that follows it.... well, for an index.php anyway.
Um, if you need to access it from a file that is in a sub directory, try using $_SERVER['php_self']; and taking a substring of two characters starting from position.... 9 (if I counted right) and that should result in "15".
while ($URL <> "")
do
# Get the part till the next /.
var str section ; stex "]^/^" $URL > $section
if ( { sen -r "^(#0123456789)^" $section } <= 0 )
# This is all digits.
echo $section
endif
# Strip off the leading / for the next time.
chex "1]" $URL > null
done
with the substr(...) and the strpos(...) function you can do this.
First count the number of characters your domain/categories string is long.
Then with the strpos() find the next / and with the substr() extract a substring of a given length from the original string.