public static function isIpInNetArray($ip, &$array) { $returnValue = false; foreach ($array as $subnet) { list($net, $mask) = split("/", $subnet); if (Network::isIPInNet($ip, $net, $mask)) { $returnValue = true; break; } } return $returnValue; }