Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function array_search_key($needle,$haystack,$haystackKey,$strict=false){
- foreach($haystackas$key=>$value){
- if(isset($value[$haystackKey])){
- if($strict){
- if($value[$haystackKey]===$needle)returntrue;
- }else{
- if($value[$haystackKey]==$needle)returntrue;
- }
- }
- }
- returnfalse;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement