note 89469 modified in function.in-array by danbrown

From: Date: Mon, 09 Mar 2009 20:00:33 +0000
Subject: note 89469 modified in function.in-array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151665@lists.php.net to get a copy of this message
A little function to use an array of needles: <?php function array_in_array($needles, $haystack) { foreach ($needles as $needle) { if ( in_array($needle, $haystack) ) { return true; } } return false; } ?> --was-- A little function to use an array of needles: function array_in_array($needles, $haystack) { foreach ($needles as $needle) { if ( in_array($needle, $haystack) ) { return true; } } return false; } http://php.net/manual/en/function.in-array.php

« previous php.notes (#151665) next »