I have found the way to get the values as I want them to be in the database. Changing the loop part in the above code with code did the trick.
$data = get_post_meta( get_the_ID(), 'combined', true );
foreach($data as $singleData => $value ){
$thisArray = $data[$singleData];
foreach ($thisArray as $key2 => $value){
add_post_meta( get_the_ID(), $singleData, $thisArray[$key2], $unique = false);
}
}
Related Posts:
- How to check if image is already stored in a site’s post database? (network)
- How To Make Connection To WordPress Data Base In A Plugin?
- Changing user_nicename
- WordPress will not operate correctly
- How to Join two tables from separate databases within WordPress
- Refresh page after update_post_meta
- Search and Replace in database: How to replace data in SQL dump file on Windows?
- Would manually deleting the dumping data fix a “#1062 – Duplicate entry ‘1’ for key ‘PRIMARY'” phpMyAdmin error?
- How to track a users progress through pages by inserting data into WordPress Database?
- Import 10,000 Users into WordPress WITH a specific ID for each user
- WP database error for comments_popup_link()
- if statement on database query
- Unusable menus and “Illegal widget setting ID: nav_menu_item[]” error
- How to create Sub Sub domain Multi User blogs?
- #1062 – Duplicate entry ‘1’ for key ‘PRIMARY’
- How to generate page content from database the right way?
- Proper way to edit a post via phpMyAdmin without breaking the compare revisions tool
- Store and Work with huge array in WP [closed]
- phpMyAdmin displays error when importing database
- Prevent Data Resubmission On Page refresh
- Adding Custom Forms
- How to get the POST TITLE using the POST ID?
- Why is the post meta[] empty when I make a call to the wordpress rest api?
- Is it necessary to sanitize wp_set_password user input?
- WordPress Scheduled Event Request Blocking
- Trying to establish connection to External Database
- Getting id of poll from WP database
- How to insert a single row to WP database table?
- $wpdb->update with multiple parameters gives error
- wp search-replace on database returns PHP fatal error: Array and string offset access syntax with curly braces is no longer supported
- Is it possible to create a wordpress database with php code?
- Store a default value for a transient on plugin activation
- Split reads to a different connection string
- custom user role wordpress – grant guest access to edit.php without insert/update/delete
- Dynamic content in template
- inserting a post from an extern php file but post content doesn’t show on wp site
- Not connecting to database in file with multiple MySQL connections
- Display Data in Table from External Database in WP using Shortcodes
- WordPress Block developer from exporting Database via PHP
- How to retrieve the data from the sever and displaying it in a page?
- Building a REST API for your web app exposes primary keys of DB records?
- Saving data from custom form in wordpress database
- wpdb Cannot Update column in Database
- Lost in trying to create user database system
- Get wp_current_user_id using PHP and MySQL
- WPDB – Read and write value from / to database
- How to Generate a list of Most Commented post?
- Adding data to custom wordpress database table
- Add row to custom database Table and delete all rows older than 1 day
- select a single val though a table in wordpress
- Add posts to custom table in database instead of wp_posts
- What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- $_POST returning empty values
- How to send custom form submissions to WordPress Database?
- Submiting with problems on one of the options php wprdpress
- Confuse between forms and tables
- code that I can run, or a plug in to show what sql tables something pulls information from
- Adding column to wpex_users
- Using wpdb to connect to a different database is not working
- Editing the term_order field
- WordPress database error only while loading page for 1st time
- Multiple WordPress sites with different theme and plugin sharing the same content
- How to grab data from input and store it into custom table in database?
- custom search query database in child theme
- wp-login.php?redirect_to=https problem
- Insert data from form to database
- How do I fetch a data from an external database into my wordpress homepage
- Full search and replace isn’t enough to make all pictures to be loaded with https
- Generate random access token to a post page
- How to query a staging database?
- Get meta_query value by user meta array
- I changed the password for the database user of my website, updated wp-config.php and wordpress asks to be reinstalled
- I want to use wordpress database in android app using json encode?
- Child theme functions.php file change database entries
- Accessing external database: ERR_INCOMPLETE_CHUNKED_ENCODING
- Can form entries from a WordPress form go to a database
- AJAX Not Working With WordPress Database properly
- Weird Behaviour: Not all WordPress Posts appearing
- Can not manually create a database ( db, user, pass ) for a plugin
- two wordpress sites, two themes, one database, same content
- Insert double entry in DB
- Check if values exists DB
- MySQL database migration to WordPress
- Host does not allow remote connection, so how do I transfer data to my WordPress site?
- MySQL Engine vs. Charset
- Custom query_posts() parameter
- How to print array of specific item
- How to check if a value exists in one of two database tables
- How to edit the default database of WordPress [closed]
- Insert into db with foreach problem
- notify users when changed database
- Display total count of products in orders of a specific order status
- How do I empty a specific meta_value for all users in PHP
- Create custom table for wordpress custom registration flow
- Custom form that stores data in mysql database
- How to get data (not value or name) from radio options to POST to database
- Creating a table via dbDelta
- wpbd to connect to a VPS mysql database
- Retrieve data from external database and insert back in