I have 2 arrays one is the collection of key and other with a collection of data ex.
$array1 = ['0'=>'A1','1'=>'A2','2'=>'A3'];
and
$array2 = ['A1'=>'Data1','A2'=>'Data2','A3'=>'Data3','A4'=>'Data4','A5'=>'Data5'];
I want data like this
$array = ['A1'=>'Data1','A2'=>'Data2','A3'=>'Data3']