首页 > 代码库 > 获取checkbox 组成字符串

获取checkbox 组成字符串

 <input type="checkbox" id="goods_server_name" name="goods_server_name[]" value="http://www.mamicode.com/1"  >1<input type="checkbox" id="goods_server_name" name="goods_server_name[]" value="http://www.mamicode.com/2"  >2<input type="checkbox" id="goods_server_name" name="goods_server_name[]" value="http://www.mamicode.com/3"  >3<input type="checkbox" id="goods_server_name" name="goods_server_name[]" value="http://www.mamicode.com/4"  >4$str_tag="";$s=$_POST[‘goods_server_name‘];for($i=0;$i<count($s);$i++){  if($i==0){    $str_tag = $s[$i];  }else{   $str_tag = $str_tag .",".$s[$i];  }
}