$array1 = [0 => 2, 1=> 3, 2=> 4, 7=>9, 8=>10, 9=> 1];
$array2 = [0 => 'a', 1 => 'b', 2 => 'c', 3 => 'd', 4 => 'e', 5 => 'f', 6 => 'g', 7 => 'h', 8=> 'i', 9 => 'j'];
$result = [0 => 'a', 1 => 'b', 2 => 'c', 7 => 'h', 8=> 'i', 9 => 'j'];
$result_array=[];
foreach (array_keys($array1) as $key){
$result_array[$key]=$array2[$key];
}
var_dump($result_array);