Use the php function unserialize() on that string and you will get a proper array.
$cats = get_cats_from_database();
$cats = unserialize($cats);
//now $cats is an array like Array(0 => 20, 1 => 343 );
Related Posts:
- Matching usermeta at registration to categories of content
- How To Find Out WordPress Category Table in MYSQL?
- How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms
- How to convert regular categories to custom taxonomy?
- Adding Custom User Profile data based upon Categories
- Return array of categories to php function
- Exporting just posts of a specific category
- Listing all posts from current category on page
- Display WooCommerce product categories in a 4 columns custom menu [closed]
- Deleting All tags except categories Wp database
- How to Import Categories with Descriptions from a CSV File?
- Show post only if match all categories
- Dropdown category filter
- How Do I Merge Categories With phpMyAdmin
- how to remove category from database
- Accessing WordPress MySQL Database via Data Connection in Visual Studio 2010 using C#
- Force a user’s posts category
- Resort get_categories
- Huge category CSV import does not work
- How to use an array of categories as a dropdown?
- Wacky taxonomy in wordpress
- Create menu locations for each category in wordpress
- Use premade array as categories in wp_query?
- How to list all categories and their IDs using SQL query?
- How to get an array with all categories and corresponding names?
- Link To Child Category For A Post
- List a maximum of ‘x’ product categories with qty of ‘y’ in each column
- Need to echo category id in multi-dimensional array
- Getting Category Children
- Deleting a category from WordPress admin does it remove it completely from the database?
- I need to exclude from a query a category and a few custom taxonomies
- How Do I Delete WordPress Posts Older Than 400 Days, From A WordPress Category
- Let user select their own category
- How to store category and tags separatly on wordpress?
- Mass Update User Profile Checkbox Options
- Create categories manually in database
- Search Replace Database ONLY for posts of certain category?
- Categorizing Just Imported Posts
- Cant get unique_array() work on get_the_category() foreach loop
- Backend – Categories and Menus conflicts
- add an image field to wordpress category
- How to change category id on get_posts array
- Fetch all categories from database
- How to define category ID in an array?
- Order Categories by Character Count
- how do I exclude a category foreach
- How to create an automatic MultiColoumn MegaMenu with Categories WordPress
- Is There a Difference Between Taxonomies and Categories?
- Why is my database import losing text widget data?
- List all subcategories from category
- Add custom field to Category
- Get Category ID inside Category template
- Only one category per post
- WordPress Multisite – global categories
- Get the children of the parent category
- Get posts from sites in Multisite?
- WP REST API: filter by category 1 AND category 2
- How To Get Parent Category Slug of Current Post
- Display All Products by Category with WooCommerce
- What is the difference between a “tag” and a “category”?
- Is there an easy way to make a meta box have the tabs like the Categories meta box has?
- How to check if I’m on the last page of posts?
- Display posts from the same category using next/previous post link
- How would I get a taxonomy/category list inside a Gutenberg block?
- Can I set a default featured image for a category?
- Check if a post is in any child category of a parent category
- Force category choice before creating new post?
- Gutenberg editor add a custom category as wrapper for custom blocks
- WooCommerce: List All Categories
- How to get category and archive title?
- Get category ID from category slug (not working)
- How do I remove “Uncategorized” from posts with more than 1 category?
- Get rid of WordPress category, tag and author archives?
- Individual rss feed entry length for categories?
- How can I create a category landing page followed by pages of posts?
- Remove parent category from permalink? Basically only have the child category?
- Custom permalink structure leads to be 404 on pagination
- Retrieve Product category ‘NAME’ by product category ID – WooCommerce?
- Posts URL structure like site.com/category/the-post-title
- Can’t custom taxonomies have same terms (slugs) as categories?
- How to get permalinks with category base working with sub-categories
- How to remove the term “category” from category pagination?
- Using wp_category_checklist in a widget
- WP 3.9 TinyMCE no longer loads on category description editor
- On the category page, get the category object
- Get only the top level categories using get_categories() without foreach loop
- Get all categories and posts in those categories
- How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
- How to add featured image for category (without a plugin)?
- How to create a custom sort for WordPress categories
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Category archive by year with permalink support /category/YYYY
- Best Way to Redirect Category to Page and Hide Category
- get_terms vs. get_categories: does it matter?
- What is a good robots.txt?
- Allow users to create their own feed from selected categories?
- Hook when category is added to post
- get_categories for custom post type with a specific custom taxonomy attached
- Add a URL prefix to permalinks of one category of posts only
- How do you add categories to custom post types in WordPress?