字符串转数组

//判断字符串转数组
private function strToArray($ids){
if(!str_contains($ids,","))
return _response([],100,"data error");
$ids = explode(",", $ids);
if(count($ids) == 0)
return _response([],100,"data error");
foreach ($ids as &$v)
$v = $this->decode($v);
return $ids;
}
posted @ 2019-12-20 15:22  烈焰螺旋  阅读(339)  评论(0编辑  收藏  举报