Heim > Fragen und Antworten > Hauptteil
$data ="realname=lemon&numid=123"
怎样转换成
$data= array('realname'=>'lemon'
,numid=>'123',)
黄舟2017-05-16 13:03:19
用ajax post到后台的数据直接为数组形式
$.ajax({
type: "POST",
url: "some.php",
data: "name=John&location=Boston",
success: function(msg){
alert( "Data Saved: " + msg );
}
});