How to match array key with array value. With array_intersect() is to match key array. But how to match key in first array with value in second array.
For example array:
$value_array=array(
'1'=>'text one',
'2'=>'text two',
'3'=>'text three',
'4'=>'text four',
'5'=>'text five',
'6'=>'text six',
'7'=>'text seven',
'8'=>'text eight',
'9'=>'text nine',
'10'=>'text ten'
);
$key_array=array(
'1'=>'1',
'2'=>'2',
'3'=>'4',
'4'=>'5',
'5'=>'7'
);
if use array_intersect(), is use to match key. I want to search key array and get value array. And output will show like this:
Array (
[1] => text one
[2] => text two
[3] => text four
[4] => text five
[5] => text seven
)