I have a string like this:
$params="currency=EUR&externalPlayerId=1&country=BE&language=EN&platform=WEB&playMode=DEMO&secureLogin=xctr_xcasters&symbol=vs50aladdin";
I will convert this string to an array:
$array1 = explode('&', $params);
Result is: Array ( [0] => currency=EUR [1] => externalPlayerId=1 [2] => country=BE [3] => language=EN [4] => platform=WEB [5] => playMode=DEMO [6] => secureLogin=xctr_xcasters [7] => symbol=vs50aladdin )
Now i want to sort this aphabetic:
sort($array1);
Result is: Array ( [0] => country=BE [1] => currency=EUR [2] => externalPlayerId=1 [3] => language=EN [4] => platform=WEB [5] => playMode=DEMO [6] => secureLogin=xctr_xcasters [7] => symbol=vs50aladdin )
Now i want to convert this array back to a string:
Result is: country=BE¤cy=EUR&externalPlayerId=1&language=EN&platform=WEB&playMode=DEMO&secureLogin=xctr_xcasters&symbol=vs50aladdin
But it should be: country=BE¤y=EUR&externalPlayerId=1&language=EN&platform=WEB&playMode=DEMO&secureLogin=xctr_xcasters&symbol=vs50aladdin
There is something wrong with the currency but i can’t solve this. Any help?
You need to sign in to view this answers
Leave feedback about this