bp_group_ids_array_flatten( $array )

Flatten array.

Description

Parameters

$array

(Required)

Return

(array|bool)

Source

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

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.