Actually i have two arrays as given below
$array1=array('0'=>'abc','1'=>'xyz');
$array2=array('0'=>'pqr','1'=>'mno');
I want to two arrays first created with key[0] and second with key[1]. means should look like as follow
$a1=array('0'=>'abc','1'=>'pqr');
$a2=array('0'=>'xyz','1'=>'mno');
The result must be
$a1 = array (
'0' => $array1[0],
'1' => $array2[0]
);
$a2 = array (
'0' => $array1[1],
'1' => $array2[1]
);
You try this code