bp_group_ids_array_flatten( $array )

Flatten array.

Description

Parameters

$array

(Required)

Return

(array|bool)

Source

File: bp-groups/bp-groups-functions.php

3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
function bp_group_ids_array_flatten($array) {
    if (!is_array($array)) {
        return FALSE;
    }
    $result = array();
    foreach ($array as $key => $value) {
        if (is_array($value)) {
            $result = array_merge($result, bp_group_ids_array_flatten($value));
        }
        else {
            $result[$key] = $value;
        }
    }
    return $result;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.