[英]how to send the array from android to php?
I'm trying to insert this this array into mysql table so I'm using php. 我试图将此数组插入到mysql表中,所以我正在使用php。
For example I want to insert the checked items form checkbox and I already store it in an array like this 例如,我想插入选中的项目表单复选框,并且已经将其存储在这样的数组中
Bundle b = getIntent().getExtras();
String[] resultArr = b.getStringArray("selectedItems");
how do to send this to php? 如何发送到PHP?
and how do the php receive the array? 以及PHP如何接收数组? does the usual $__GET works? 通常的$ __ GET是否有效?
$arr = $_GET['resultArr[]'];
thanks before, sorry for my bad english 之前感谢,对不起我的英语不好
您可以创建要发送的数据的JSON
。在php上,您可以解析JSON
以检索该数据,请参考此链接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.