BP_REST_XProfile_Repeater_Endpoint::array_equal( array $a, array $b )

Check the array is equal or not.

Description

Parameters

$a

(Required) Array first.

$b

(Required) Array two.

Return

(bool)

Source

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

	public function array_equal( $a, $b ) {

		$a_final = $this->array_column_ext( $a, 'type' );
		$b_final = $this->array_column_ext( $b, 'type' );

		return (
			is_array( $a )
			&& is_array( $b )
			&& count( $a ) === count( $b )
			&& count( $a_final ) === count( $b_final )
			&& $a_final === $b_final
		);
	}

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.