Title: Settings API: How to save an array within an array?
Last modified: August 20, 2016

---

# Settings API: How to save an array within an array?

 *  [thebigkrumm](https://wordpress.org/support/users/thebigkrumm/)
 * (@thebigkrumm)
 * [14 years, 5 months ago](https://wordpress.org/support/topic/settings-api-how-to-save-an-array-within-an-array/)
 * I’m trying to implement the settings API, but I’m having some difficulty saving
   data to an assigned array within my setting.
 * My options page has dynamically created fields that the user can add or remove
   using JQuery (i.e., ‘add another field’ and ‘remove this field’.) I want to save
   the values from those fields to an array so that I call them back with a ‘foreach’
   statement.
 * What it’s saving now:
 * > _Array ( [example\_text] => Default value [example\_textarea] => Default value[
   > example\_jquery] => test1 [example\_jquery2] => test2 [example\_jquery3] =>
   > test3 [example\_select] => choice1 [recrm\_lead\_sources] => Website Lead Circle
   > Of Influence Past Referral [header\_logo] => [favicon] => [custom\_css] => )_
 * What I’d like it to save:
 * > _Array ( [example\_text] => Default value [example\_textarea] => Default value**[
   > example\_jquery] => Array ( [example\_jquery1] => test1 [example\_jquery2] 
   > => test2 )**[example\_select] => choice1 [recrm\_lead\_sources] => Website 
   > Lead Circle Of Influence Past Referral [header\_logo] => [favicon] => [custom\
   > _css] => )_

The topic ‘Settings API: How to save an array within an array?’ is closed to new
replies.

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [saving settings](https://wordpress.org/support/topic-tag/saving-settings/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [thebigkrumm](https://wordpress.org/support/users/thebigkrumm/)
 * Last activity: [14 years, 5 months ago](https://wordpress.org/support/topic/settings-api-how-to-save-an-array-within-an-array/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
