Created
March 18, 2009 14:30
-
-
Save aron/81154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function split_array($array, $key_values) { | |
$sorted_array = array(); | |
foreach($array as $key => $value) { | |
if(in_array($key, $key_values)) { | |
$sorted_array[$key] = $value; | |
} | |
} | |
return $sorted_array; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment