I have one multidimensional array and this array I have to convert into single array with sort. I tried to use call_user_func_array('array_merge', $ranges); this function. After using this function get single array. When I use sort() function on single array then show output 1.
My array
Array
(
[range1] => Array
(
[0] => 1113
[1] => 2224
)
[range2] => Array
(
[0] => 500
[1] => 1112
)
[range3] => Array
(
[0] => 2225
[1] => 4446
)
)
Use call_user_func_array('array_merge', $ranges);
output
Array
(
[0] => 1113
[1] => 2224
[2] => 500
[3] => 1112
[4] => 2225
[5] => 4446
)
Now I am use sort() function then show 1. Why this happen?