On Tue, 13 Jan 2004, Andrey Hristov wrote:

> I know HEAD is freezed, but anyway to ask whether a new function
> in_array_all() can be added.  It works like in_array() but checks
> whether all needles are in the stack array.

Do we really need this either way?

function in_array_all($needles, $haystack, $strict = false) {
    foreach($needles as $needle) {
        if (!in_array($needle, $haystack, $strict)) {
           return false;
        }
    }

    return true;
}

-adam

-- 
[EMAIL PROTECTED]
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to