# ArrayToList()

Transform the array to a list of elements delimiter by the given string

```
ArrayToList( array=array, delimiter=string );
```

**Returns:** string

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| array | array | Yes | Name of array |  |
| delimiter | string | No | Character or multicharacter string to separate list elements. The default value is comma. *Alias: delimiters* | , |

# Examples

### Convert an array to a list (optional delimiter)

```cfml
	newArray = ['a','b','c','b','d','b','e','f'];
	dump(arrayToList(newArray));

    // member function, with custom separator
	dump(newArray.toList('--'));
```







# Categories

[Arrays](../../categories/array.md), [Lists](../../categories/list.md), [Strings](../../categories/string.md)

# See Also

[array.toList()](../objects/array/tolist.md)