0
When using the function split
in a string obviously the keys will be enumerated from 0 to ... but I would like to choose which key should be, using just one of the words that will be in the string, example to help simplify:
$string = "key1=xxx&key2=xxx&key3=xxx&key4=xxx ...";
When using split separating the string in &
i would like the keys to be sorted according to the "key" and stay like this:
Array
(
[key1] => xxx1
[key2] => xxx2
[key3] => xxx3
[key4] => xxx4
)
How can I do that?
I think that that can help.
– rray
Thanks @rray only parse_str was enough to solve the problem :)
– Leo Letto