BP_REST_XProfile_Repeater_Endpoint::array_column_ext( array $array, string $columnkey )

Array column for recursive Multidimensional array.

Description

Parameters

$array

(Required) Multidimensional Array.

$columnkey

(Required) Array key name to get.

Return

(array)

Source

File: bp-xprofile/classes/class-bp-rest-xprofile-repeater-endpoint.php

	public function array_column_ext( $array, $columnkey ) {
		$result = array();
		foreach ( $array as $k => $sub ) {
			$result[ $k ] = array_column( $sub, $columnkey );
		}
		return $result;
	}

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.