Search for values in nested array

后端 未结 6 1238
滥情空心
滥情空心 2020-12-21 01:07

I have an array as follows

array(2) {
  [\"operator\"] => array(2) {
    [\"qty\"] => int(2)
    [\"id\"] => int(251)
  }
  [\"accessory209\"] =>         


        
6条回答
  •  有刺的猬
    2020-12-21 01:13

    This function is useful in_array(211, $array['accessory']); It verifies the whole specified array to see if your value exists in there and returns true.

    in_array

提交回复
热议问题