I have a string that looks like:
single=Single&multiple=Multiple2&check=check1&radio=radio2
how could I create a array like this:
array(
'single' => 'Single',
'multiple' => 'Multiple2',
'check' => 'check1',
'radio' => 'radio2',
)
|
Use parse_str
And in $data you will have your variables. |
||||
If this comes from an URL you can have this already as an array in the $_GET or $_POST variables. Otherwise use explode() to convert string to an array. |
|||||||||
|