Title: How to save multiple repeatable fields as array in database?
Last modified: August 21, 2016

---

# How to save multiple repeatable fields as array in database?

 *  [Aleksandar](https://wordpress.org/support/users/jashimili/)
 * (@jashimili)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/how-to-save-multiple-repeatable-fields-as-array-in-database/)
 * On the theme im working i’m trying to make slideshow. I have everything set so
   far i just don’t understand how to save them in database when there are multiple
   slides.
 * I will skip the code as it’s very large ill just add example of input values.
 * Each slide is made of image upload field(which is basically text field that holds
   link to image) and textarea field for the text in slide.
 * So values of the slide are like this.
 *     ```
       Slide 1 -> $slide[image][0]  -- $slide[text][0]
   
           Slide 2 -> $slide[image][1]  -- $slide[text][1]
   
           Slide 3 -> $slide[image][2]  -- $slide[text][2]
       ```
   
 * It’s a WordPress theme so wordpress it self is capable to save an array when 
   it recognize it. And if anyone is familiar theme is built upon Options Framework.
 * When i save this, this is what i get in database.
 *     ```
       a:1:{s:13:"slide_example";a:1:{s:5:"image";s:0:"";}}
       ```
   
 * when (i guess) it should be like this
 *     ```
       a:1:{s:13:"slide_example";a:1:{s:5:"image";s:0:"slide text";};a:2:{s:5:"image";s:0:"slide text";};a:3:{s:5:"image";s:0:"slide text";}}
       ```
   

The topic ‘How to save multiple repeatable fields as array in database?’ is closed
to new replies.

## Tags

 * [array](https://wordpress.org/support/topic-tag/array/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)

 * 0 replies
 * 1 participant
 * Last reply from: [Aleksandar](https://wordpress.org/support/users/jashimili/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/how-to-save-multiple-repeatable-fields-as-array-in-database/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
