Transpose and flatten multiple rows of array data [duplicate]
PHP Snippet 1:
$a = array("a","b","c");
$b = array("d","e","f");
$c = array("g","h","i");
function array_zip(...$arrays) {
return array_merge(...array_map(null, ...$arrays));
}
var_dump(array_zip($a,$b,$c));