-1

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

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

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

如何为此编写代码?-我想遍历这个数组并在 php.ini 中插入来自 image[] 的每个图像。

当我想做的时候

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

但这无济于事

如果 isset 的条件失败。

4

1 回答 1

0

试试这个:如果这有效

if(isset($_POST['images'])){
  $images[] = $_POST['images'];

while($row = $images){
  //your query here
}
于 2015-08-26T21:20:59.620 回答