PHP Checkbox获取选中项与

 1 function gostrsplit($str,$str1) {
2 //$str 数据库里面查询出来的内容
3 //$str1 要对比的项的内容 $res =false;
4 $str_array = explode(",",$str);
5 for ($j = 0; $j < count($str_array); $j++) {
6 if($str_array[$j]==$str1)
7 {
8 $res = true;
9 }
10 }
11 return $res;
12 }

posted @ 2011-07-26 12:21  学坏  阅读(428)  评论(0编辑  收藏  举报