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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:54:28+00:00 2026-05-27T15:54:28+00:00

I want to send the result of a HTML sorting to the server by

  • 0

I want to send the result of a HTML sorting to the server by serializing with jQuery.
This works if I only send the result:

var result = $(this).sortable('serialize');

$.ajax({
    type: 'POST',
    url: '/cms/update/',
    data: result,
});

But I try to send a Javascript Object to the server wich contains the serialized ‘result’

In PHP I get an array with result_2 as the serialize object:

Array
(
    [ids_1] => miti_1_ti_2_col_2
    [article_id] => article_id_2
    [result_1] => 
    [ids_2] => miti_1_ti_2_col_1
    [result_2] => article_id[]=2
)

How can I get this result to be an array in PHP?

  • 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-27T15:54:29+00:00Added an answer on May 27, 2026 at 3:54 pm

    As I understood “result” is a serialized object too.

    So you have to unserialize result at first.

    Then you have to unserialize result2. Something like that:

    $res1 = unserialize($data);
    if (isset($res1['result_2']){
       $res2 = unserialize($res['result_2']);
    }
    

    Updated:

    I don’t know if your result_2 in data is already serialized. Therefore here are two examples:

    if result_2 is not serialized in data:

    $arr = array('id_1' => 'miti_1_ti_2_col_2',
                 'article_id' => 'article_id_2',
                 'result_1' => '',
                 'ids_2' => 'miti_1_ti_2_col_1'
                );
    
    $arr['result_2'] = $arr;
    
    $test1 = serialize($arr);
    $test1 = unserialize($test1);
    

    If result_2 is already serialized in data:

    $arr = array('id_1' => 'miti_1_ti_2_col_2',
                 'article_id' => 'article_id_2',
                 'result_1' => '',
                 'ids_2' => 'miti_1_ti_2_col_1'
                );
    
    $arr['result_2'] = serialize($arr);
    
    $test2 = serialize($arr);
    $test2 = unserialize($test2);
    
    $test2['result_2'] = unserialize($test2['result_2']);
    

    This code works I checked out it. If your code still doesn’t work check result in JS.

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

Sidebar

Related Questions

I am new in jquery and Ajax.I want to send parameters with jquery to
Can jquery.ajax post a value from an attribute Name? If can, I want send
Hello Sir i want send list of data to php server i use following
I have send data from my HTML page to servlet , this is the
I'm trying to send an email with an HTML attachment, I don't want the
I am new to studying jquery.ajax. I want to paste some data from a.php
I have an ActionResult in my controller that I want to send an HTML
I am getting a JSON result in ASP Classic like this: <script language=JScript runat=server
I want send e-mail with some images in content. I think I must attached
I want send a email by Email Class in codeigniter with gmail, but i

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.