Re: multi array wildcard

From: Date: Mon, 24 May 2004 22:01:52 +0000
Subject: Re: multi array wildcard
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-186857@lists.php.net to get a copy of this message
I went ahead and just wrote a quick function. If there is an easier way, please let me know. Thanks. function multi_pick($multi_array, $return_key) {
    $ret_array = array();
    foreach ($multi_array as $key=>$sub_array) {
        if (isset($sub_array[$return_key])) {
            $ret_array[$key] = $sub_array[$return_key];
        }
    }
    return $ret_array;
} On 5/24/2004 4:32 PM, John Kaspar wrote:
Something like $users[*]['name']


« previous php.general (#186857) next »