The ajax process is as follows: first, the foreground php page is passed to the js file, the js file uploads the value to the background processing page, and then four arrays are returned to the js page. Now I want to pass these four arrays to the front-end php page. I don't know how to do this. I want to give a thought or related information. thank you. serialize the array and then upload it, PHPcode $ arr = array (1, 2, 3, 4) about ajax
The process is as follows: first, the front-end php page is passed to the js file, the js file transfers the value to the background processing page, and then four arrays are returned to the js page. Now I want to pass these four arrays to the php page at the front end. I don't know how to do this. I 'd like to give you some ideas or related materials. thank you.
------ Solution --------------------
Serialize the array and then upload it,
PHP code
$ Arr = array (1, 2, 4); $ nrr = serialize ($ arr );
------ Solution --------------------
Dizzy, what is this complicated? since the final result is php-> php, use session to register your four arrays and use them directly at the front-end!
------ Solution --------------------
Discussion
Reference:
Serialize the array and upload it again. PHP code $ arr = array (1, 2, 3, 4); $ nrr = serialize ($ arr );
Receiving page
PHP code $ arr = unserialize ($ nrr );
How can I transmit the js array to the front-end page of php?
------ Solution --------------------
Assign the value to be passed to a data value on the server, and then output the value after json_encode ().
Then, after Js is obtained, it can be directly called.