Take a look at PHP’s array_values
function. Alternatively, you could typecast.
Note that if the array is in serialized form as you have put it above, you will have to unserialize it first, in either case.
$numerical_array = array_values(
unserialize(
'a:1:{s:8:"post-134";s:3:"134";s:8:"post-136";s:3:"136";}'
)
);
or
$numerical_array = (array) unserialize(
'a:1:{s:8:"post-134";s:3:"134";s:8:"post-136";s:3:"136";}'
);
Related Posts:
- Usermeta data unserialize, extract and display in table in WordPress
- Let current user know pending posts counts using wp_query
- Output product category link from WP_Query
- WP_Query – How to query all of post types categories
- get_terms with specific id order
- How to work Woocommerce pagination inside shortcode?
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- How to store checkbox data for individual users?
- WP_Query for woocommerce products with a pattern as a post_title
- “pre_get_posts” orderby custom date field in different format?
- wp_query with multiple arguments with AND
- WordPress Search Ajax + Isotope + InfiniteScroll
- How do I make these combination select filters work when only one dropdown is set? They work in WordPress 5.8.2 but don’t in 5.8.3
- Passing in MySQL prepare statement parameter separately throwing error
- How do I Populate a Table Field with User Meta Data?
- Replace a single variable with add_filter
- Nested Queries of decreasing specificity
- get different meta-data of a complicated query at the same time
- Wrong pagination results, page counter resets when navigating
- Is it possible to order posts using multiple meta queries, i.e. show posts from first meta query, then the second?
- Sending simple variable on single page to WP JSON
- How to exclude meta no index pages from wp_list_pages
- Using a new WP_Query inside the loop
- wp_Query with mutuplea values returns all posts
- Load more posts using AJAX based on posts inside WP_Query
- How to add and subtract user meta values after post meta update
- in_array not working on dev server but works on localhost
- wp_query – Exclude the first thumbnail from lazy loading on archives
- meta_query search names when they have middle initials
- How to call my PHP function with AJAX ? wp_query
- WordPress sorting posts by date and title using a dropdown
- Custom search query on WordPress page not working
- WP query posts BUT show the most recent and one per author
- User meta needed in query is serialized – how to unserialize safely?
- Include User ID in iFrame URL
- WP custom posts: filter results to custom taxonomy tag that corresponds to user meta field
- How to get specific multiple pages excerpts at homepage?
- Ajax filter with loadmore button
- Define global custom post
- How to select post ID for given parent name with nested prepared queries?
- posts_per_page displays only 2 posts instead of 4 posts
- Use WPQuery to match to specific repeater row in post
- Query by pagename not Working
- Query on a repeater date (acf)
- WP_QUERY post_in problem
- Display featured image of post type category
- how to get data from two different table from wordpress database
- Change user metadata on registration (show_admin_bar_front = false)
- Delete post meta by serialized meta value
- can I extend the WP_Query class to deal with ‘duplicate’ posts created by joining to wp_posts?
- Assign meta_query value to php variable
- get_filtered_term_product_counts – Get product terms if any products
- Trying to get pagination working on WP_Query() post grid
- Need to show 7 posts from actual date
- Store data from JavaScript object to custom table in user account
- Check the database for a postmeta field
- Add code to the header of posts by particular author
- Export WordPress User Meta to CSV/Excel
- Updating User Profile information removes image
- Search for single post by 2 tags
- Paged WP_Query is quitting on page 3
- Getting info about selected posts using one WP_Query
- Get Child of Child Pages in custom Menu
- How to change the value of a variable using input field?
- Display current user metadata on WordPress page
- List all ACF field values across every post on one page
- WordPress search query, how to modify the sql
- Modify post image in full size
- Wp-query output correct, but the loop shows one less item (only sometimes)
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Multiple Arrays for Custom Post Query using Boostrap accordions and ACF repeater fields
- How to display sticky post always at the top (before regular post) in wordpress?
- Get user by meta data key and velue
- Where do I implement this display of User Meta Data, and how to put it in a table?
- WP_Query To Display Product Of Brand On Taxonomy Page
- Update an additional user meta field with a string
- Meta query not showing result properly
- Combine multiple queries, array_unique returns nothing
- Add another role to a user when they click a button?
- Store custom field’s multiple values in one user meta key
- Get field in readable word
- How to display last whole post on the homepage
- Query to show average # of months all accounts with specific role have been active
- wordpress query returning unexpected results
- Woocommerce Related Product by 2 taxonomy
- Custom Post type Ajax search results
- not able to access $_POST on backend profile update
- Right way to display the_author_meta fields?
- Help on Wp_query to print an term
- Making list of posts with chosen description
- Query doesn’t display text data with apostrophes
- Adding user meta to post meta wp_insert_post() not working
- Ordering / grouping posts by datepicker ACF
- How to return count of items found in SQL query
- Include search tags and users in my search results system
- Get meta_query value by user meta array
- Creating a custom register form
- Display only upcoming events / Show all events when archive year is selected
- get_users when from meta key that has serialized values
- Add custom taxonomy to custom search for posts