使用Ajax将数组发送到PHP脚本
我有函数.push制作的数组。在数组中是非常大的数据。如何将此发送到PHP脚本?
dataString = ??? ; // array? $.ajax({ type: "POST", url: "script.php", data: dataString, cache: false, success: function(){ alert("OK"); } });
script.php的:
$data = $_POST['data']; // here i would like use foreach: foreach($data as $d){ echo $d; }
这是怎么回事?
慕妹3146593
holdtom