0

I'm trying to get url param in Joomla plugin while getting adress http://domainname.com?mobile=1. I'm using code:

$app = JFactory::getApplication();
$jinput = $app->input;
$var=$jinput->get('mobile', 'nothing', 'string');

but I get $var equal to "nothing".

How to get url param in Joomla plugin?

Barto
  • 469
  • 1
  • 6
  • 15

1 Answers1

0

you get this cos you give the format of the param value "string", but "1" is a int - so it falls back to the default value "nothing" cos it founds no string!