0

example.com:8080/browse?category=137 is my URL for a taxonomy category page.

How am I supposed to take the category ID (137) from that URI?

7

You can take that id from get array, try

print $_GET['category'];
3

If you are using Drupal 7 then you can make use of existing function drupal_get_query_parameters

But also you can use

$_GET['category']

Make sure you use check_plain() to be sure of save URL values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.