is there any way to convert the below array to normal array in php ?
[["2"],["2","3","4"],["8","9"],["7","4"]]
["2","3","4","8","9","7"]
is there any way to convert the below array to normal array in php ?
[["2"],["2","3","4"],["8","9"],["7","4"]]
["2","3","4","8","9","7"]
Flatten the 2d array using something like call_user_func_array('array_merge', $array);
. Then call array_unique() to eliminate the duplicates, and sort() if necessary.
$newArray = array_unique(call_user_func_array('array_merge', $oldArray));
sort($newArray);