I have an array of arrays.
For example:
$array[] = array("1", "2", "3");
$array[] = array("5", "9", "ok");
$array[] = array("test", "ok", 8");
What is the easiest way of flattening/merging this to just one array?
Result should be:
$array = array("1", "2", "3", "5", "9", "ok", "test", "ok", "8");
Is there an easier/simpler way to get this result than doing the below?
$result = array();
foreach ($array as $subarray) {
foreach ($subarray as $value) {
array_push($result, $value);
}
}