Suppose if I have string like this:
rajeshpatel&rid=10&sid=20&mid=30
Then how can I get value of "rid"
using php.
any help?
You can use parse_str
as
$str = 'rajeshpatel&rid=10&sid=20&mid=30';
parse_str($str,$result);
print_r($result);
echo $result['rid'];//10
Or you can use it in another way as
parse_str($str);
echo $rid;//10
Fiddle