Guest User

Untitled

a guest
Feb 19th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. function filter_by_value ($array, $index, $value){
  2. if(is_array($array) && count($array)>0)
  3. {
  4. foreach(array_keys($array) as $key){
  5. $temp[$key] = $array[$key][$index];
  6. if ($temp[$key] == $value){
  7. $newarray[$key] = $array[$key];
  8. }
  9. }
  10. }
  11. return $newarray;
  12. }
Add Comment
Please, Sign In to add comment