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 add featured image for category (without a plugin)?
- Category archive by year with permalink support /category/YYYY
- How do I use the same post slug for different Categories?
- Default WP Gallery – show only galleries of a certain category
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Exclude sub category posts from category display
- How to hide a specific category posts in my monthly archive?
- Automated adding of one tag to all the posts in a category
- Action hooks returning old category instead of new category
- Category checkboxes in upload modal
- How to mass-insert categories?
- What is the advantage of using header-catname.php over is_category(‘catname’);?
- Custom WP_Query for current category (in category.php)?
- Why is get_the_category() saying that I have two categories?
- Custom sidebar on category pages
- How do I get the category slug from wp_dropdown_categories
- Change the category of all posts in it
- How to display only posts assigned to a particular, isolated, subcategory
- How to hide some categories in category list under post in wordpress?
- exclude categories from search results
- Category archives with monthly pagination
- Older entries link within category page
- Two separate portfolio pages [closed]
- How to hide child categories from displaying
- How to allow Category Title to use tags?
- get listed category’s id?
- Length of Category Names
- Category url generate 404 error
- Is it possible to create an alias/custom taxonomy for a category name?
- Style a category from category list
- Adding a page summary to a specific page
- Add a category on all archive category pages
- Multiple category columns and post counting list in wordpress Homepage
- Check for parent category
- Problem with wp_create_category
- Product category display in tabs
- Sending all categories associated with a post to Google Ad Manager for use with .setTargeting
- Pull in an “Include” file based on a WordPress Category ID
- Why is URL Slug Saving Differently From How It’s Been Defined?
- How to set acf color field as background color to product category
- How to add all subcategories as submenu in WordPress menu
- How to noindex, follow a specific category wordpress?
- get taxonomy list in a page in the wordpress
- Is there a way to allow users to customize their feed view?
- Number of categories slowing down the site
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- Group Posts by First Letter of Title categories
- How to make 10 post of one category
- Listing category
- Showing one post from each category, paged?
- Custom permalinks structure
- Weird html output of single_cat_title – is not inside of the html element?
- How do I load a sql.gz file to my database? (importing)
- Restricted category in Woocommerce [closed]