I have a string like:
$q = "menu=true&submenu=true&pcode=123456&code=123456";
I want to get the value of pcode = 123456 and code = 123456.
How can I get this?
Use parse_str function if it's not from url (then use $_GET array)
Please use php explode functions to do it
ex:
<?php
$q ="menu=true&submenu=true&pcode=123456&code=123456" ;
$pieces = explode("&",$q);
print_r($pieces);
foreach($pieces as $key=>$value){
$newVarible[]=explode("=",$value);
}
print_r($newVarible);
?>