PHP 5.5 solution:
$array1 = array('a', 'b', 'c', 'd');
$array2 = array('e', 'f', 'g', 'h');
$array3 = array('i', 'j', 'k', 'l');
$composite = array($array1, $array2, $array3);
$count = count($array1);
$result = array();
for ($i = 0; $i < $count; $i++) {
$result = array_merge($result, array_column($composite, $i));
}
var_dump($result);
EDIT
or another alternative that will work with versions of PHP before 5.5
$array1 = array('a','b','c','d');
$array2 = array('e','f','g','h');
$array3 = array('i','j','k','l');
$composite = array($array1, $array2, $array3);
// transpose
array_unshift($composite, null);
$tmpResult = call_user_func_array('array_map', $composite);
// flatten
$result = call_user_func_array('array_merge', $tmpResult);
var_dump($result);
EDIT #2
Using this second method, if the initial arrays are varying lengths you will get "padded" NULL entries in the final result; these can be removed if they're not wanted by using array_filter();
$array1 = array('a','b','c','d','x','u','xx');
$array2 = array('e','f','g','h','s','d','t');
$array3 = array('i','j','k','l');
$composite = array($array1, $array2, $array3);
// transpose
array_unshift($composite, null);
$tmpResult = call_user_func_array('array_map', $composite);
// filter and flatten
$result = array_filter(
call_user_func_array('array_merge', $tmpResult),
function ($value) {
return $value !== NULL;
}
);
var_dump($result);