note 64161 deleted from function.in-array by cmb

From: Date: Sun, 15 Sep 2019 13:13:34 +0000
Subject: note 64161 deleted from function.in-array by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212203@lists.php.net to get a copy of this message
Note Submitter: rick at fawo dot nl ---- Here's another deep_in_array function, but this one has a case-insensitive option :) <? function deep_in_array($value, $array, $case_insensitive = false){ foreach($array as $item){ if(is_array($item)) $ret = deep_in_array($value, $item, $case_insensitive); else $ret = ($case_insensitive) ? strtolower($item)==$value : $item==$value; if($ret)return $ret; } return false; } ?>

« previous php.notes (#212203) next »