$data ="realname=lemon&numid=123"
How to convert to
$data= array('realname'=>'lemon'
,numid=>'123',)< /p>
歡迎選擇我的課程,讓我們一起見證您的進(jìn)步~~
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 convert, just print it outprint_r($_POST)
. What you see is the data in this format