要将查询字符串中的数组传递给php,您应该添加
[]到标识符并将每个项目都添加为单独的条目,因此这样的工作应该可以:
namevaluePairs.add(new BasicNamevaluePair("devices[]", device1));namevaluePairs.add(new BasicNamevaluePair("devices[]", device2));namevaluePairs.add(new BasicNamevaluePair("devices[]", device3));现在,
$_POST['devices']在php端将包含一个数组。



