I mean like python's chain.
Goal
chain([['a', 'b'], ['c', 'd', 'e'], ['f', 'g', 'h', 'i']]);
["a","b","c","d","e","f","g","h","i"]
Actually used but unpleasant solution
function chain($array_of_arrays)
{
return call_user_func_array('array_merge', $array_of_arrays);
}
I'm actually not a big fan of call_user_func_array
nor foreach
, so I'm stuck here.