简体   繁体   中英

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.

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?

and how do the php receive the array? does the usual $__GET works?

$arr = $_GET['resultArr[]'];

thanks before, sorry for my bad english

您可以创建要发送的数据的JSON 。在php上,您可以解析JSON以检索该数据,请参考此链接

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM