$data ="realname=lemon&numid=123"How to convert to$data= array('realname'=>'lemon',numid=>'123',)< /p>
欢迎选择我的课程,让我们一起见证您的进步~~
Use ajax to post data to the background directly in the form of array$.ajax({ type: "POST", url: "some.php", data: "name=John&location=Boston", success: function( msg){
alert( "Data Saved: " + msg );
}});
No need to transfer, just receive it directly
No need to convert, just print it outprint_r($_POST). What you see is the data in this format
print_r($_POST)
Use ajax to post data to the background directly in the form of array
$.ajax({
type: "POST",
url: "some.php",
data: "name=John&location=Boston",
success: function( msg){
}
});
No need to transfer, just receive it directly
No need to convert, just print it out
print_r($_POST)
. What you see is the data in this format