php一个字段查询多个值

img

图片为演示数据

我想一个字段查询多个值。但是我的数据是带有 ‘ ’ 冒号的字符串 $ceshi。我怎么能把冒号去掉!实现一个字段查多个值

建议将input输入 和 output输出数据描述清楚。


$ce = '';
for($i=1;$i<$schoolList->total();$i+=1){
    $ce = $ce.$schoolList[$i]['article_id'].',';
}
$ce = explode(',',$ce);
return $this->with(['grade'])
    ->where('school_name','in',$ce);