Use PHP’s unserialize function:
<?php
$data="a:2:{i:0;s:12:"Sample array";i:1;a:2:{i:0;s:5:"Apple";i:1;s:6:"Orange";}}";
$unserialized = unserialize($data);
echo '<pre>';
print_r($unserialized);
echo '</pre>';
?>
Result:
Array
(
[0] => Sample array
[1] => Array
(
[0] => Apple
[1] => Orange
)
)
Got the sample data over at unserialize.com, a handy little site if you want to quickly check what’s inside that serialized string.
Related Posts:
- How to update the options table for a widget
- How to display custom widget anywhere
- Indexes of widgets instances starts with ‘2’ in ‘wp_options’ table
- What is the advantage of the wp_options design pattern?
- How do I save data from submitted form from widget
- Add New Footer Widget Area with Limited Options?
- How to update widget from widget() function?
- Custom shortcode in widget forced to top of widget
- Separate backend “Widgets” page for each language
- How to access widget data from outside widget?
- Widget queries even when there are no sidebars?
- wordpress widget textbox in the sidebar
- Creating a one click demo importer
- How to change text widget title h2 to h1
- Why does WordPress stores widget options in a multidimensional array?
- Font awesome Icon HTML in widgets disappear on save
- Text Widget Links Not Working
- When adding a widget, what kind of widget should I used to add images and text and styling?
- How to save widget fields generated from an array?
- Multiple wp_options tables to share content across installs
- get_option returns undesired blank instance of a widget
- Global $wpdb is not showing correct data with function call
- WP – Genesis – How to get the content of a widget in php? [closed]
- How to remove traces from widget during uninstallation
- Text widget doesn’t save the content
- Widget without DIV wrapper
- Widget on the right side of the page overlaps with the left side [closed]
- How to get options of all active widgets ?
- Proper approach to moving complete site from one domain to another AND preserve widgets
- Placing a widget with $wpdb query
- Select two value from meta key and post meta
- How to add custom tinymce plugin to new text widget
- Custom CSS for a particular text/html widget in WordPress
- In widget, the value of select field doesn’t get updated, changes after saving
- SELECT field options disappear when saving widget
- How to change widget title in wordpress version 5.8.1?
- How to get individual values from custom widget?
- Title not Emptying in a Widget
- Widget settings disappear after refreshing page
- Use customizer or sidebar for header settings?
- Default WordPress widgets always appear
- can’t edit widgets after moving from subfolder to root
- Display widget outside sidebar?
- Options page for widget
- Widget Disappearing in IE
- Passing widget options to external script
- Add New Footer Widget Area with Limited Options?
- Widget options – where to put them?
- Database size Widget
- Text Widget Not Working
- Using wpdb to connect to a separate database
- Programmatically add widgets to sidebars
- WPDB Insert or if exists Update
- WordPress 3.8 – Dashboard 1 Column Screen Options
- How to return number of found rows from SELECT query
- Executing Javascript When a Widget is Added in the Backend
- Is it mandatory to use $wpdb->prefix in custom tables
- get_results using wpdb
- Loading scripts only if a particular shortcode or widget is present
- Will it break my site if I delete all transient records in wp_options table?
- Limit number of Widgets in Sidebars
- How Can I Add the “Insert From URL” Tab to a Custom 3.5 Media Uploader?
- Update Option Stored in Multi-Dimensional Array
- Give Editor Access To Sidebar
- $wpdb won’t insert NULL into table column
- How to load Widget javascript + css files only if used?
- Using widget options ‘outside’ the widget
- Please explain how WordPress works with MySQL character set and collation at a low level
- Where is the content of widgets stored in mysql table
- Hide specific categories from category widget
- Adding Widget form fields dynamically
- Get error messages when $wpdb->insert() returns false?
- How to store widget fields data as an array?
- Detecting errors generated by $wpdb->get_results()
- changing wp-admin/widgets.php
- Add class to before_widget from within a custom widget
- Does dbDelta delete columns as well?
- wpdb update add current timestamp not working
- How to fetch Data in WordPress using MySQLi or $wpdb
- How can I use the built in WordPress “browse link” functionality?
- Limit the number of inactive widgets
- Is there any way to dynamically alter widget titles?
- Translate widget titles using qTranslate plugin
- Can the new 4.8v text widget visual editor be removed?
- Code for Recent Posts Widget
- How to delete all records from or empty a custom database table?
- Get number of widgets in sidebar
- wpdb->insert multiple record at once
- Text Widget creates a
- Can a widget in the Customizer be “single-use” (i.e. disabled after 1 instance has been added)?
- check if registered sidebar is active & has widget content
- How to edit widgets in WordPress
- dynamically add scripts to WP_Widget widget() method
- Extend WordPress 3.8 Site Activity Dashboard Widget to include more comments
- How to use is_active_widget?
- What is the purpose of the option name hack_file in the options table?
- Get a list of all Widgets registered in WordPress admin widgets-area
- WordPress Unit Testing – Cannot Create Tables
- Modifying the default search widget
- Adding iframe Content to Sidebar Widget