Tribe__Utils__Array::to_list( mixed $list, string $sep = ',' )
Returns a list separated by the specified separator.
Contents
Parameters
- $list
-
(mixed) (Required)
- $sep
-
(string) (Optional)
Default value: ','
Return
(string) The list separated by the specified separator or the original list if the list is empty.
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;
}
Changelog
| Version | Description |
|---|---|
| 4.6 | Introduced. |