In order to figure the issue out, I ran unserialize on both data strings and saw that the top example saved as an associative array like:
Need help with format of nested array in MySQL => Title 1
[point] => 55.635656,12.506767
and the second array was flat like:
[0] => title
[1] => Title 0
[2] => point
[3] => 8.228271, 56.094402
In order to have the imported example match the repeatable box, you need to replace
array_push($point,"title");
array_push($point,$newctexttitle);
array_push($point,"point");
with
$point['title'] = $newctexttitle;
and replace
array_push($point,$XYcoordinate);
with
$point['point'] = $XYcoordinate;
Related Posts:
- How to use update and delete query in wordpress
- How to make WordPress plugin check for database changes and then do something?
- simple wordpress ajax plugin not working when not logged in
- WordPress Ajax Custom Query – High CPU LOAD
- Query String being Removed Creating a Pagination Issue within a Custom Plugin
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- Update results, Before deleting the related category [closed]
- wp query foreach deleting record returning only first or last item
- Custom array from a query only write the last row of the query
- wpdb prepare insert table doesn’t work
- WordPress WP_Query without query GET parameters
- select a single val though a table in wordpress
- How to import woocommerce custom fields data into another site?
- The plugin generated 225 characters of unexpected output during activation
- Send data from plugin to external database
- MySQL update text field with ‘
- How to edit the default database of WordPress [closed]
- Undefined function mysql_connect()
- MySQL “Or” Condition
- Transaction when using WP functions rather than vanilla SQL?
- I can’t fetch query parameters ($_GET parameters) with get_query_var
- Change Password Hint
- Dynamic URL to reference custom PHP files
- Prevent multiple counts by same user – WP PostViews plugin
- Jquery ajax to custom php file: returning blank data
- Add value to usermeta without removing previous values?
- How can I call a row of user specific data from a custom table added to the WP Database
- How to merge local and live databases?
- Theme url in all plugin pages
- Performance issues with large website [closed]
- Create a quick start wordpress installation [closed]
- theme options echoing multiple times
- How to access function from outside of a class within this class in WP plugin?
- how to echo all tables that start with a prefix
- PHP can I add line numbers to file_get_contents()
- How to select WooCommerce products by post_meta and order them
- Remove one value in dismissed_wp_pointers?
- Accessing data from a non-WP database/table within a page content
- what is the best practice to add new field to an api route
- Use custom post type for a store locator
- How do I programmatically set a user as spam in BuddyPress? [closed]
- How can I save unique user data on my site? [closed]
- 306 MB of wp_options occupied by WordPress SEO Plugin, is that normal? [closed]
- Ordering users by custom user meta
- WP CRON duplicate wp_insert_post with has < and > tag
- How to send Ajax request from my plugin in admin dashboard?
- AJAX success response is not working but it’s saving my changes
- Best practice for show data to one specific user?
- How can I hide that I Use WordPress (with W3 Total Cache)
- Saving plugin settings – ERROR: options page not found
- WordPress Block developer from exporting Database via PHP
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- How do I display offsite database info on my wordpress site?
- How to remove the message ‘We could not find any results for your search’ without changing template files and without adding posts/pages?
- Custom meta box values are not getting saved for my custom post type
- Use $wpdb or other PHP script method to find/replace in WP database
- Issue with fetching mysql data and displaying results via shortcode in webpage
- Can’t upload CSV file to plugin directory using custom upload form in admin panel
- Custom route and query
- Validate and Sanitize WP REST API Request using WP JSON Schema?
- Can I remove or edit an include() from a function with a filter?
- Call to undefined function error in plugin
- How do I make this Metabox show current DB value?
- Edit Account – read and write to MySQL
- Why when I create a new post I found 2 record related to this post into the posts database table?
- mySQL queries are executed twice on wordpress website
- Get category id when SEO URL is turned on
- Most viewed posts in WordPress
- What’s wrong in my PHP code? I’m using WordPress Astra Theme and I can’t insert data into my SQL
- Using ACF Relationship field to set post type to draft or published status
- How to extend SelectControl with data from my theme
- How can i avoid duplicate same post in wp?
- How do I disable cache for a certain page?
- How to check if plugin update process completed in wordpress?
- using filter and hook inside class
- Change upload URL by mime type
- New database entry to trigger runing PHP/SQL query through link with token, without logging into the website
- Query doesn’t display text data with apostrophes
- add menu page in loop menu order
- I want show only data for today
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- SQL Query Search page
- Private messaging – Getting and displaying the avatar/url of a message recipient
- widget: input the px value from user and use it as inline style in widget function
- Custom post type single page return to listing page
- WordPress rewrite question
- Using Nonce for my Form
- Create new folder and upload files to custom folder via wp_handle_upload
- How to pass username into form that sends data to database
- SHARING TO FACEBOOK – FROM DYNAMICALLY GENERATED PAGE
- Your PHP installation appears to be missing the MySQL … After deleting and restarting from cpanel
- Custom taxonomy with page post type – WordPress
- Query posts by custom taxonomy slug in WP REST API?
- oneOf JSON Schema validation not properly working for custom post meta value?
- Too few arguments at registering new templates in my plugin
- I want to lists posts in wordpress to nearest location entered by the user
- running an existing WordPress site from Visual Studio Code?
- Translate string in another langage than Locale
- Integrate a Custom Post Type with Learndash Plugin
- Remove slug of multiple custom post types with and without hierarchical