Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8889289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:13:28+00:00 2026-06-14T22:13:28+00:00

i have a problem with JS multidimensional array and ajax, im tried many things

  • 0

i have a problem with JS multidimensional array and ajax, im tried many things and decide to make a join of the array to then, make a explode on php and get the array.

I decide that after look that if a send the “park” array just like that:

    $.post( VIEW+THEME+"ajax/insertPark.php", {
            p:Base64.encode(park),
    }

I dont get the array on PHP.

Join doesnt works fine,i dont know if is because me array dont looks like: [fruit,food,meat]…

And in the console.log test the park.join make that park be the string ‘~’, with no other data.

var park = [];
    $.each(languajes, function(i, itemData) {
        park[i] = [];
        park[i]['idLanguaje']   = itemData['idLanguaje'];
        park[i]['name'] = $('#name-'+itemData['idLanguaje']).val();
    });

    console.log(park);
    console.log(park.join('~'));

    $.post( VIEW+THEME+"ajax/insertPark.php", {
            p:Base64.encode(park.join('~')),
    }, function(data) {
        //window.location.href='/';
    }, "json" );

Any idea how i can do this? The elements on the array depends of the number of languajes on database, (i.e.: the name of a park on diferents languajes), can be ES,EN or ES,EN,RU,FR… and function must adapt to this.

Thanks in advice !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T22:13:29+00:00Added an answer on June 14, 2026 at 10:13 pm

    Make json from your array and stringify it – Serializing to JSON in jQuery

    In PHP use json_decode function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to output data table with PHP multidimensional array, but i have problem
I want to make a multidimensional array in php. Here is what i have
I seem to have a problem converting an array backwards and forwards between PHP/JS.
I have a variable in javascript and a multidimensional array in PHP. I want
I have a PHP multidimensional array which will store information depending on parameters input.
I have a problem.. i want to combine two array.. multidimensional Array 1. Array
I have very long multidimensional array that have many sub arrays. I would like
My problem is as follows. I have a multidimensional array. I declare my array.
I have a multi-dimensional array, no problem. How do I interrogator one of the
I have a multidimensional array, which consists of 426 smaller arrays, which also comprise

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.