Template:Arraydefine

Approximate recreation of the $($#arraydefine:}} parser function. It takes the same parameters:


 * key is the name of the array
 * values is a list of elements stored to the array
 * delimiter is the delimiter between those elements (defaults to ,)
 * options can only be set to unique (anything else will have no effect), which removes duplicate and empty elements (implemented by arrayunique)

See arrayprint for a recreation of the {#arrayprint:}} parser function.

Note: Defining arrays with multiple empty elements at the end will cause unexpected behavior, especially when printing. Use the unique parameter to prevent this.