i have a array - the output of my array looks like this:
Array
(
["US"] => 186
["DE"] => 44
["BR"] => 15
["-"] => 7
["FR"] => 3
)
and i want to replace the "-" with "other"
so it should look like this at the end:
Array
(
["US"] => 186
["DE"] => 44
["BR"] => 15
["other"] => 7
["FR"] => 3
)
could someone help me with this? str_replace havent worked with me... and if you could i want to have the "other" part of the array at the bottom - like this:
Array
(
["US"] => 186
["DE"] => 44
["BR"] => 15
["FR"] => 3
["other"] => 7
)
thanks :)
current code:
$array_land = explode("\n", $land_exec_result);
$count_land = array_count_values($array_land);
arsort($count_land);
$arr['other'] = $count_land["-"];
unset($count_land["-"]);
but this havent worked for me :/