I read some questions about passing parameters from PHP to Javascript on the internet. using ajax technology, php basically adopts the echojson_encoded method and requires the PHP file to be clean, I want to develop it in the CI framework so that controllers can pass some multi-dimensional arrays to views, but the echo method will be displayed on the webpage as soon as the parameters are passed. How can we transmit data correctly and make the data not displayed on the interface? Controllers: $ this-& gt; load-& gt; view (& #39; map & #39;, $ position) posit ciphpjavascript
I read some questions about passing parameters from PHP to Javascript on the internet. using ajax technology, php basically adopts the echo json_encoded method and requires the PHP file to be clean, I want to develop it in the CI framework so that controllers can pass some multi-dimensional arrays to views, but the echo method will be displayed on the webpage as soon as the parameters are passed. How can we transmit data correctly and make the data not displayed on the interface?
// Controllers:
$ This-> load-> view ('map', $ position)
// Position is a two-digit array.
// Views
In map. php, javascript is called.