Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers

You can take that id from get array, try

print $_GET['category'];
share|improve this answer
Thanks this Worked – user1414193 May 6 at 5:48

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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