public static function getSubArrayFromArrayByKeys(array $array, array $keys)
    {
        $result = [];

        foreach ($keys as $key) {
            if (array_key_exists($key, $array)) {
                $result[$key] = $array[$key];
            }
        }

        return $result;
    }
public static function getSubArrayFromArrayByKeys(array $array, array $keys)
    {
        $result = [];

        foreach ($keys as $key) {
            if (array_key_exists($key, $array)) {
                $result[$key] = $array[$key];
            }
        }

        return $result;
    }
public static function getSubArrayFromArrayByKeys ( array $ array , array $ keys ) { $ result = [ ] ; foreach ( $ keys as $ key ) { if ( array_key_exists ( $ key , $ array ) ) { $ result [ $ key ] = $ array [ $ key ] ; } } return $ result ; }
Get SubArray from array by keys

@access public

@param array $array
@param array $keys

@return array
@static
Get SubArray from array by keys