Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/380.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何将多维数组从Tianium发送到php_Javascript_Php_Arrays_Titanium Alloy - Fatal编程技术网

Javascript 如何将多维数组从Tianium发送到php

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中检索此数组

我试过以下几件事:

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]['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),        
});