# nats\_add\_to\_array

*Article Topics:* [*Smarty*](https://docs.toomuchmedia.com/getting-started/common-topics/smarty)*,* [*Customization*](https://docs.toomuchmedia.com/getting-started/common-topics/customization)

## Parameters

(*Required parameters in **bold**)*

| Parameter                                                                                                                                 | Description                                                      | Possible Values                 | Default Value                    | Example                |
| ----------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------------------------------- | -------------------------------- | ---------------------- |
| add                                                                                                                                       | The list of items to add to the array                            | Any characters                  | *Empty.* Creates an empty array  | add="one,two,three"    |
| **array**                                                                                                                                 | **Name of array to create**                                      | **Any valid Smarty array name** | **You must provide an argument** | **array="myarray"**    |
| [assign\_prefix](https://docs.toomuchmedia.com/nats-admin/skins-and-templates/further-reading/template-function-parameters/assign_prefix) | Prefix output variables with this word. (Click link for details) | Any valid Smarty variable name  | *None.* (No prefix is used)      | assign\_prefix="myvar" |

## Output

None. Creates the array set with the *array* parameter.
