Check if a value exits in array (Laravel or Php)

前端 未结 4 722
天涯浪人
天涯浪人 2021-02-18 17:38

I have this array:

$list_desings_ids = array(\'hc1wXBL7zCsdfMu\',\'dhdsfHddfD\',\'otheridshere\');

With a die() + var_dumo() this array return

4条回答
  •  走了就别回头了
    2021-02-18 18:23

    you need to change only your condition replace with that code

    if(in_array($design->design_id, $list_desings_ids))
    

提交回复
热议问题