I have two arrays:
$array = new Array('id'=>1, 'name'=>'Peter', 'sex'=>'male', 'age'=>25);
$excludes = new Array('sex', 'age');
I want to get the following result:
$array = new Array('id'=>1, 'name'=>'Peter');
The items whose keys are found in the array $excludes are removed.
How can I achieve this conveniently?