从POST处理数组的语法


Syntax to process array from a POST, android?

我正在传递一个数组到http post从我的android应用程序到php服务器如下:

params.add(new BasicNameValuePair("image[]", encodedImage));

现在我想要图像数组的所有值,在我的php代码。如何做到这一点?

如何编写此代码?-我想循环遍历这个数组,并在php中插入image[]中的每个图像。

当我想做

if(isset( $_POST['image'] )){
$images = array($_POST['image']);
  while($row = $images){
  //insert into table
  }
}

但这没有帮助

试试这个:如果这个有效

if(isset($_POST['images'])){
  $images[] = $_POST['images'];
while($row = $images){
  //your query here
}