Title: Update Options Inserting Array Incorrectly
Last modified: August 19, 2016

---

# Update Options Inserting Array Incorrectly

 *  [tracyfu](https://wordpress.org/support/users/tracyfu/)
 * (@tracyfu)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/update-options-inserting-array-incorrectly/)
 * I wrote a plugin that inserts a music playlist as an array of multiple associative
   arrays. For most people it seems to be working, but there are a few for which
   it inserts the correct array, but the data is coming back as capital “A’s.”
 * So, instead of this:
 * (
    [default] => Array ( [1] => Array ( [artist] => Feist [title] => My Moon My
   Man [file] => [http://www.tracyfu.com/projects/wordphonic/mp3s/01.mp3](http://www.tracyfu.com/projects/wordphonic/mp3s/01.mp3)[
   image] => [http://www.tracyfu.com/projects/wordphonic/images/01.png](http://www.tracyfu.com/projects/wordphonic/images/01.png))
 *  [2] => Array
    ( [artist] => Lovage [title] => Stroker Ace [file] => [http://www.tracyfu.com/projects/wordphonic/mp3s/02.mp3](http://www.tracyfu.com/projects/wordphonic/mp3s/02.mp3)[
   image] => [http://www.tracyfu.com/projects/wordphonic/images/02.png](http://www.tracyfu.com/projects/wordphonic/images/02.png))
 *  [3] => Array
    ( [artist] => Led Zeppelin [title] => Since I’ve Been Loving You[
   file] => [http://www.tracyfu.com/projects/wordphonic/mp3s/03.mp3](http://www.tracyfu.com/projects/wordphonic/mp3s/03.mp3)[
   image] => [http://www.tracyfu.com/projects/wordphonic/images/03.png](http://www.tracyfu.com/projects/wordphonic/images/03.png)))
 * )
 * It’s printing this:
 * (
    [default] => Array ( [1] => Array ( [artist] => A [title] => A [file] => A[
   image] => A )
 *  [2] => Array
    ( [artist] => A [title] => A [file] => A [image] => A )
 *  [3] => Array
    ( [artist] => A [title] => A [file] => A [image] => A ) )
 * )
 * —–
 * I can’t figure out for the life of me why… The data is coming from input fields
   that look like this:
 * `<input type="text" name="ephonic_playlists[default][1][artist]" />`
 * And, when I look in the DB the data is serialized correctly. The only thing I
   can think is that the array must read “Array(…)” and it’s only reading the first‘
   A’, but I really don’t know…
 * Please help anyone?

The topic ‘Update Options Inserting Array Incorrectly’ is closed to new replies.

## Tags

 * [arrays](https://wordpress.org/support/topic-tag/arrays/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [forms](https://wordpress.org/support/topic-tag/forms/)
 * [update_option](https://wordpress.org/support/topic-tag/update_option/)

 * 0 replies
 * 1 participant
 * Last reply from: [tracyfu](https://wordpress.org/support/users/tracyfu/)
 * Last activity: [18 years, 2 months ago](https://wordpress.org/support/topic/update-options-inserting-array-incorrectly/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
