Which of the following is an example of jquery + php json database query? Materials urgently needed recently ------ solution -------------------- reference ------ solution ---------------------- test. php & lt ;? Phpexit (json_encode (array (jquery + php query database implementation json example)
Which of the following is an example? Materials urgently needed recently
------ Solution --------------------
Reference
------ Solution --------------------
Test. php
Exit (json_encode (array ('i1' => '1', 'i2 '=> '2 ',)));
Jquery ajax request
$. GetJSON (
"Test. php ",
Function (json ){
Alert ("JSON Data:" + json. i1 );
}
);
For details, refer to the jquery manual.
------ Solution --------------------
Check the php Manual for database queries.
------ Solution --------------------
Test. php
Exit (json_encode (array ('i1' => '1', 'i2 '=> '2 ',)));
Jquery ajax request
$. GetJSON (
"Test. php ",
Function (json ){
Alert ("JSON Data:" + json. i1 );
}
);