Tribe__Utils__Array::to_list( mixed $list, string $sep = ',' )

Returns a list separated by the specified separator.


Parameters

$list

(mixed) (Required)

$sep

(string) (Optional)

Default value: ','


Top ↑

Return

(string) The list separated by the specified separator or the original list if the list is empty.


Top ↑

Source

File: src/Tribe/Utils/Array.php

	public static function to_list( $list, $sep = ',' ) {
		if ( empty( $list ) ) {
			return $list;
		}

		if ( is_array( $list ) ) {
			return implode( $sep, $list );
		}

		return $list;
	}

Top ↑

Changelog

Changelog
Version Description
4.6 Introduced.