@thegrandoverseer
you could also use the build-in php array functions to get exactly what you want to have:
<?php
$seed_array = array('foo'=>'bar', 'someotherkey'=>'whatev', 'bar'=>'baz', 'baz'=>'foo', 'anotherkey'=>'anotherval');
$keys_array = array('baz', 'foo', 'bar');
$return_array = array_intersect_key($seed_array, array_flip($keys_array)) + array_diff_key($seed_array, array_flip($keys_array));
?>