Javascript 如何将多维数组从Tianium发送到php
//现在如何在php中检索此数组 我试过以下几件事: 1json_decode$_POST['products'] 2var_转储 3json_decodestripslashes$_POST['products']Javascript 如何将多维数组从Tianium发送到php,javascript,php,arrays,titanium-alloy,Javascript,Php,Arrays,Titanium Alloy,//现在如何在php中检索此数组 我试过以下几件事: 1json_decode$_POST['products'] 2var_转储 3json_decodestripslashes$_POST['products'] 如何在php中使用此数组???var\u dump$\u POST的结果是什么?无法在php中打印数组!钛合金的bcoz他们给出了错误!有没有办法用php打印接收到的数组?您是否检查过:是!我使用$a=json\U decode$\U POST['products']和$a[0][
如何在php中使用此数组???var\u dump$\u POST的结果是什么?无法在php中打印数组!钛合金的bcoz他们给出了错误!有没有办法用php打印接收到的数组?您是否检查过:是!我使用$a=json\U decode$\U POST['products']和$a[0]['product\U name']从php文件返回product\U name,但返回null
var send = Ti.Network.createHTTPClient({
onerror : function(e) {
Ti.API.debug(e.error);
alert('There was an error during the connection');
},
});
send.open('POST', 'abc.php');
var data = Ti.App.Properties.getList('cart');
//data containing js array object:
i.e:[{"key":"5736","quantity":"1","product_name":"Fruit Raita","price":"75.00"},{"key":"11454","quantity":"2","product_name":"Veg. Harabhara Kabab","price":"90.00"}]
send.send({
products:JSON.stringify(data),
});