Merging two different arrays alternatively into third array

<?php 
$arrival = array ('a1','a2','a3');
$departure = array ('v1','v2','v3');
$data= array();

foreach(array_keys($arrival) as $i)
{

 	$data[] = "(" .$arrival[$i] . '<=>' . $departure[$i]. ")" ;
     
}
echo "<pre>"; print_r($data);
?>

Leave a Reply

Your email address will not be published. Required fields are marked *