Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function filter_by_value ($array, $index, $value){
- if(is_array($array) && count($array)>0)
- {
- foreach(array_keys($array) as $key){
- $temp[$key] = $array[$key][$index];
- if ($temp[$key] == $value){
- $newarray[$key] = $array[$key];
- }
- }
- }
- return $newarray;
- }
Add Comment
Please, Sign In to add comment