Title: What format is this ?
Last modified: August 8, 2026

---

# What format is this ?

 *  Resolved [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [1 day, 14 hours ago](https://wordpress.org/support/topic/what-format-is-this/)
 * I want to know what format is this and if I can create my own ?
 * **a:1:{s:10:”subscriber”;b:1;}**
 * I think it’s something like an array data ?
    -  This topic was modified 1 day, 14 hours ago by [wildapache](https://wordpress.org/support/users/wildapache/).

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/what-format-is-this/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/what-format-is-this/page/2/?output_format=md)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 day, 13 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988063)
 * This is a serialized string. Implemented in PHP using `[serialize()](https://www.php.net/manual/en/function.serialize.php)`,
   it is used in WordPress, for example, for arrays that are entered in option fields.
   See also: [https://developer.wordpress.org/reference/functions/add_option/](https://developer.wordpress.org/reference/functions/add_option/)
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [1 day, 13 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988073)
 * Thanks !
 * I found this code in a meta value.
 * So, now I can create a meta key with a multiple values it will very helpful to
   short some code.
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [1 day, 12 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988133)
 * Strange.
 * I can serialize any type of arrays ? Or ?
 * I created an array, serialize it, after, without put the data in db unserialize
   it, and it works.
 * But, if a put serialize data in DB and after GET it data for unserialize it’s
   doesnt work.
 * Tomorrow i try to understand why
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 day, 11 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988138)
 * WordPress also serializes the content for you when it comes to meta fields. You
   don’t have to worry about it yourself. Just use `update_post_meta()` and `get_post_meta()`
   or `update_option()` and `get_option()`, and don’t access the fields directly.
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [1 day, 11 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988141)
 * I need to **update user meta**, and now I think is a wordpress function add or
   store serialized array in wrong way. Because if I insert it directly in DB it
   work, if I do via **update_user_meta**, it doesnt.
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [1 day, 11 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988145)
 * I found where was a problem.
 * WordPress serialize it in automatically.
 * So, I remove serialize, and put just array
 * I my case it was a double serialization 🙂
    -  This reply was modified 1 day, 11 hours ago by [wildapache](https://wordpress.org/support/users/wildapache/).
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 day, 11 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988153)
 * That’s exactly what I’ve already explained to you several times above. It’s also
   in the manual for those functions. You don’t have to worry about it yourself.
   I’m glad it’s working now.
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [1 day, 4 hours ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988252)
 * [@threadi](https://wordpress.org/support/users/threadi/) another related question.
 * Can I find exact data in serialized array ?
 * For example I have an array like this : **$exp = array(“start” => “20:00”);**
 * How can I get exact data from user > meta_value ?
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [22 hours, 51 minutes ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988342)
 * First save it:
 *     ```wp-block-code
       update_user_meta( 42, 'my_value', $exp );
       ```
   
 * Then read it:
 *     ```wp-block-code
       $exp = get_user_meta( 42, 'my_value', true );
       ```
   
 * Output the “start” index after reading:
 *     ```wp-block-code
       echo esc_html( $exp['start'] );
       ```
   
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [22 hours, 37 minutes ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988355)
 * [@threadi](https://wordpress.org/support/users/threadi/)
 * Yes I do the same with my data.
 * But question is a little bit another.
 * For example, we have 10 users, they all have a in _usermeta, **meta_value** like**
   $exp = array(“start” => “20:00”);**
 * Now, I need to find 5 users which **meta_value** where **start **== **20:00**.
 * I read some faq, how I can understand wordpress do not unserialize data when 
   it make a query and we need make search like in a normal text ?
    -  This reply was modified 22 hours, 36 minutes ago by [wildapache](https://wordpress.org/support/users/wildapache/).
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [22 hours, 4 minutes ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988364)
 * You can retrieve that kind of information using `WP_User_Query`. Example:
 *     ```wp-block-code
       $query = array(        'meta_query' => array(            array(                'key' => 'my_value',                'value' => 's:5:"start";s:5:"20:00";',                'compare' => 'LIKE',            )        )    );$users = new WP_User_Query( $query );
       ```
   
 * See: [https://developer.wordpress.org/reference/classes/wp_user_query/](https://developer.wordpress.org/reference/classes/wp_user_query/)
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [21 hours, 51 minutes ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988369)
 * [@threadi](https://wordpress.org/support/users/threadi/)
 * Thanks !
 *  [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * (@mbigul)
 * [21 hours, 15 minutes ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988377)
 * Hi [@wildapache](https://wordpress.org/support/users/wildapache/),
 * WordPress does not unserialize the data while running a Database query. If you
   frequently need to search for or filter a value in the serialized data, storing
   it separately is a better design choice. So it can be queried directly.
 * As a workaround, you can unserialize the data after retrieving it from the database
   using PHP’s **_unserialize()_** function. Then search for the values in the unserialized
   data.
 * Can you please share an example of your serialized data with multiple records
   that match **start **== **20:00**?
 *  Thread Starter [wildapache](https://wordpress.org/support/users/wildapache/)
 * (@wildapache)
 * [19 hours, 21 minutes ago](https://wordpress.org/support/topic/what-format-is-this/#post-18988461)
 * [@mbigul](https://wordpress.org/support/users/mbigul/)
 * > WordPress does not unserialize the data while running a Database query. If 
   > you frequently need to search for or filter a value in the serialized data,
   > storing it separately is a better design choice.
 * I make it before, and it works well, but in this way I have a multiple not much
   grouped meta_key.
 * After I noticed in usermeta this **a:1:{s:10:”subscriber”;b:1;}** and I asked
   what is it and how it works.
 * Now is more clear, about how it works, but I am looking for a “standart” way 
   to use it instead of create my own methods. WordPress read seriazile data like
   a normal text, ok, for this exist solutions too, which wrote about [@threadi](https://wordpress.org/support/users/threadi/)
 *  [Bigul Malayi](https://wordpress.org/support/users/mbigul/)
 * (@mbigul)
 * [13 hours, 52 minutes ago](https://wordpress.org/support/topic/what-format-is-this/page/2/#post-18988660)
 * Hi [@wildapache](https://wordpress.org/support/users/wildapache/),
 * WordPress treats meta_value as text when running the database query. You can 
   use the query (**_WP\_User\_Query_** with _**meta\_query**_ and **_LIKE_**) suggested
   by [@threadi](https://wordpress.org/support/users/threadi/) to search for a value
   inside serialized data.
 * It is fine to keep related values under one meta key, but searching serialized
   data with **_LIKE_** may not work well with large amounts of data.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/what-format-is-this/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/what-format-is-this/page/2/?output_format=md)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwhat-format-is-this%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

## Tags

 * [format](https://wordpress.org/support/topic-tag/format/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 18 replies
 * 3 participants
 * Last reply from: [wildapache](https://wordpress.org/support/users/wildapache/)
 * Last activity: [12 hours, 17 minutes ago](https://wordpress.org/support/topic/what-format-is-this/page/2/#post-18988696)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
