This a:1:{i:0;s:1:"3";}
is the serialized version of an array in PHP. You can unserialize it by using the function unserialize
like below-
$data = unserialize('a:1:{i:0;s:1:"3";}');
So after unserialize inside $data
you’ll get an array like below-
Array
(
[0] => 3
)
This array will contain the user ID which is blocked by the user who is the owner of the user meta.
Now here you can run a foreach
loop on $data
and using get_user_by
function you get all the users.
Hope that helps.
Related Posts:
- How to convert objects into arrays
- How to check if a meta value has already been assigned to any user?
- How can I save unique user data on my site? [closed]
- Grouping posts by a custom meta value
- If Array Values Match Another Array’s Values, Then
- Comapare get_user_meta value
- How can get all users by current user meta?
- Edit Account – read and write to MySQL
- MySQL Query Returns Array () In Shortcode
- How to store checkbox data for individual users?
- Convert a column of a table containing an Array as response in HTML
- Usermeta data unserialize, extract and display in table in WordPress
- How to insert multiple rows and columns in database using array
- How to display MySQL table data which is stored as an array?
- Store custom field’s multiple values in one user meta key
- get_users when from meta key that has serialized values
- Let users register weight each day and save it in DB
- Checking array against author id in loop
- inserting a post from an extern php file but post content doesn’t show on wp site
- Database query works fine outside WordPress
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- $wpdb->wp_users returning empty value for
- Large Woocommerce Site (83,000 items), What Can I Do? [closed]
- $wpdb->insert() does not Insert record in a table
- Using custom tables for old posts
- How to get all users by custom current user meta (array)?
- Help with a $wpdb MySQL Query
- WordPress SQL injection
- Not connecting to database in file with multiple MySQL connections
- Way to bulk make all my tags lowercase?
- $Wpdb post meta query is not working with mutliple meta keys and values? [closed]
- How i can obtain all the post meta for a specific post as an array?
- Alter required message using comment form api
- multiple where condition in result query
- a:0:{} is replaced into database as s:6:”a:0:{}”;
- Advanced Custom Fields – display label and value only if value entered
- meaning of (array)function()
- Multiple meta_key in one global $wpdb;
- wp_force_remove_style’ not found
- Custom array from a query only write the last row of the query
- WordPress member notification
- Read array in php?
- How to fix this warning:call_user_func_array() expects exactly 2 parameters, 1 given in D:\wamp\www\…….\wp-includes\class-wp-hook.php on line 286
- Can’t Query Custom Table Using $wpdb Method
- How can I access string value in an array?
- Moving wordpress site from localhost to live server using GoDaddy cPanel
- How does WP work in conjunction with a web server?
- How to use if statement in an array? [closed]
- How to array only one key from another array
- WordPress Block developer from exporting Database via PHP
- Filtering a function’ output for a new continued function
- Get html data with javascript to php array and store to wordpress database
- $wpdb returns duplicate posts
- Update postmeta after theme switch
- How do I create a numbered list with PHP? [closed]
- Why is an array created in a function hooked to customize register populated when customizer is loaded but not when the front-end is loaded?
- Mixing variables into an array when inserting values
- Location of core code for database connection and get_header
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- php include not working in custom page
- How do I display offsite database info on my wordpress site?
- Creating Database Table vs. Adding MetaData to Post & User
- Countdown to date function?
- Make a database query using WordPress
- How to use array in function to get only value I want
- Error while setting role
- Get categories names as an array to use it in theme settings
- Force Users To Relogin
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- WordPress Custom SQL Table with UserID Filter for results
- How to get the last category name of a child category?
- How to say if meta_value is greater than 0 in an array?
- Getting users with a specific meta data and then querying their posts?
- How to use two meta_compare in an array?
- How to update and save user metadata on page visits?
- Warning: in_array() null given in PHP function
- Most commented posts by time period (last 12h, last 24h and etc)
- Use $wpdb or other PHP script method to find/replace in WP database
- email alert for product availability
- Foreach loop inside an array_merge
- How can I add a new row in a separate database when someone registers via WordPress?
- Issue with fetching mysql data and displaying results via shortcode in webpage
- Login redirect. Check user meta and redirect accordingly
- Loop over Array and get the distinct ids
- Basic wpdb update question
- How to access or parse key/values that have “string”
- Hide posts if user is added to it WP_query
- User Meta Value not echoing despite Var_Dump Showing correct string
- Remove empty terms from array, sort alphabetically, update back to repeating field
- WordPress loop by meta key that is an array? and how loop multiple arrays
- Only show first image in foreach loop
- Shortcode for Listing Users from Meta Value?
- Conditional multidimensional arrays and array_map
- I can’t update my data through $wpdb
- A $_POST should occur when submit form but is not?
- Custom route and query
- Output: “Array”
- Getting different user data depending on where I use variable
- How can I get all values from my array in a loop in php? [closed]