How to get a variable from a url in Joomla

Suppose you have this url:

You can fetch and return the id like this:

$id = JRequest::getVar('id');

Subscribe to our Blog
Subscribe to this content and receive updates directly in your inbox.

This website uses cookies so that we can provide you with the best user experience. By clicking "continue" you agree to cookies being used in accordance with our Cookies Policy.