in_array() and multidimensional array

前端 未结 22 1326
眼角桃花
眼角桃花 2020-11-22 00:30

I use in_array() to check whether a value exists in an array like below,

$a = array(\"Mac\", \"NT\", \"Irix\", \"Linux\");
if (in_array(\"Irix\"         


        
22条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 01:06

    Please try:

    in_array("irix",array_keys($b))
    in_array("Linux",array_keys($b["irix"])
    

    Im not sure about the need, but this might work for your requirement

提交回复
热议问题