About Ajax, what to do with it

Source: Internet
Author: User
About Ajax
Process is this: first by the front desk PHP page to the JS file, JS file to the Background processing page, after processing the return of four arrays to JS page. Now want to pass these 4 arrays to the foreground PHP page, do not know what to do here, give a thought, or related information, thank you

------Solution--------------------
Serialization of the array,
PHP code
$arr =array (1,2,3,4), $NRR =serialize ($arr);
------Solution--------------------
Halo, make so complicated to do what, since the end result is php->php then use the session to register your four array, the front desk directly use!
------Solution--------------------
Explore
Reference:
Serialization of the array, PHP Code$arr=array (1,2,3,4), $NRR =serialize ($arr);
Receive Polygon page
PHP code$arr=unserialize ($NRR);

I now JS can receive the background PHP transfer value problem is how to pass the JS array to the foreground page php

------Solution--------------------
The value to be passed on the server is first assigned to a data, then Json_encode () after the output
Then JS can be converted and then directly call the
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.