//假设多个id是','号隔开的 //把$lid组合成为数组 $lid_arr =explode(',',$lid); if(!empty($lid_arr)){ //循环数组 foreach($lid_arr as $lid ){ //原来的比对流程 if ($lid==intval($row['id'])) {
}else { ?>
} }
------解决方案-------------------- $arr =explode(',',$lid); if (in_array(intval($row['id']) , $arr) {
}else { ?>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn