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 7035187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:16:29+00:00 2026-05-28T01:16:29+00:00

So, I should send data to PHP script (AJAX, jQuery): – [‘item1′,’item2′,’item3’] – action

  • 0

So, I should send data to PHP script (AJAX, jQuery):

 - ['item1','item2','item3']
 - action = update
 - uid = 'dsfs112'

It should received back:

 - ['item2','item3']
 - action = update
 - uid = 'dsfs112'

PHP will return my changed array

How the better way to do it?

  • 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-05-28T01:16:30+00:00Added an answer on May 28, 2026 at 1:16 am

    If only thing you want to do is to remove the first element of the array from parameters, just use array_shift() on the array in PHP.

    The basic workflow will look like this:

    1. Send this data structure using POST (jQuery’s .post() will do), eg. like that;

      jQuery.post('my_script.php', {
          'array': ['item1','item2','item3'],
          'action': 'update',
          'uid': 'dsfs112',
      }, function(data){
          // data here is your JSON object
      }, 'json');
      
    2. On PHP side (within my_script.php file probably):

      <?php
      array_shift($_POST['array']);
      echo json_encode($_POST);
      

    And this should be all – data within your JS success callback should be then of the following structure:

    {
        'array': ['item2','item3'],
        'action': 'update',
        'uid': 'dsfs112',
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys I have an ajax jquery function that receives data from a php
I tried to just send some information to a php file using Jquery Ajax.
I currently run a PHP-script using CURL to send data to another server, to
I'm trying to send an archived objective-c object to a php script and then
Jquery Ajax Call inserts new record on DB. File been called (php) needs to
I am sending a json string using JQuery.ajax to a php page where I
How can you use jquery to simply post to a php script the value
I am designin a shoutbox which is AJAX based. http://businessgame.be/shoutbox.php The script works perfectly
Just a quick question. I want to send data from Javascript to a PHP
I'm writing a C program under Windows that should send an ENTER key to

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.