I need to create an array of arrays.
I have been using array_map(null,$a,$b,$c)
to do this and it works fine, however, it doesn't work if one of the mapped arrays doesn't exist.
Ben kullandım bu soruna almak için:
$myArray= array();
if (isset($a)) {
array_push($myArray,$a);
}
if (isset($b)) {
array_push($myArray,$b);
}
if (isset($c)) {
array_push($myArray,$c);
}
Is there a more elegant/shorter method of writing this?
I've tried applying some functions via array_map($function,$a,$b,$c)
but with no luck.