<?
if($_POST['submit']){
  $ids=implode(',',$_POST['ids']);
	//print_r($ids);
	$sql="update `table` set `display`='0' where `id` in(".$ids.")";
	echo $sql;
	}
?>

<form method="post">
<input type="text" value="1" name="ids[]" />
<input type="text" value="2" name="ids[]" />
<input type="submit"  value="submit" name="submit"/>
</form>

 输出结果:update `table` set `display`='0' where `id` in(1,2dd)

 

相关:

implode的使用

相关文章:

  • 2020-05-23
  • 2022-01-06
  • 2021-12-21
  • 2021-08-20
  • 2021-11-15
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2021-11-04
  • 2022-12-23
  • 2022-01-01
  • 2021-12-12
相关资源
相似解决方案