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 widget options ‘outside’ the widget
- dynamically add scripts to WP_Widget widget() method
- How do i manually place a widget code
- How to Validate Widget Input
- Insert a span inside widget title to give a different color to the second word
- Add a select box to all widgets
- How to avoid widgets added to sidebar on theme activation?
- WordPress “include TEMPLATEPATH” or?
- Create More Widget Holders Like Active Widgets and Inactive Widgets
- /images/image.jpg not working in sidebar
- WordPress widget args – classname?
- Creating a admin widget for /wp-admin/post.php?
- Custom widget select options needs to stay selected after save
- Adding custom html and standard widgets to sidebar
- Cannot update custom database table row
- Get widget Title from widget id
- Include chat (HTML, js, css) in all pages of WordPress
- WP_enqueue_script() loads them always in wp_footer()?
- Multilple single-use widgets with the same output callback
- wp_editor is not rendering shortcode
- How to add multiple footer widgets?
- Help With Custom Image and Text Widget
- Save Multiply Checkboxes in a Widget
- plugin code is pulling information from database in one instance and not in other. What is wrong?
- Remove the Inactive Widgets
- My Custom Widget does not save in sidebar
- Cannot change footer text?
- How do I get an array of widgets?
- How to save widget settings on field value change?
- Can’t save widget
- prevent custom widget file names from showing in Appearance > Editor
- How to add a recent post function to a text widget I created for practice?
- Adding dashboard widgets to show – custom post type stats, information from other plugins
- Upgraded to 3.3, My Widgets Disappeared
- Dynamic Bootstrap Carousel ID per widget on same page
- Tabs widget from Elementor is not showing the content in it to users. But at admin side it is working fine
- How can I get $wpdb to show MySQL warnings?
- About wp database hooks (error establishing connection)
- How to implement widgets error output with data validation?
- AJAX call in backend results in empty update_option
- Nonce and widget
- How to give a File Upload option in wordpress Widget backend?
- Pass widget variable to external function
- Widget area does not show any contents for specific users in admin interface. How to go about debugging?
- Creating an custom admin page for editing widgets
- Show or hide a widget from pages
- Author Link in Recent Posts Widget
- Custom widgets do not appear in dashboard > appearance > widgets
- how to add multiple menu in custom menu widget?
- Theme Widget Area Defaults