check associative array contains value

后端 未结 5 1682
粉色の甜心
粉色の甜心 2021-01-26 01:27
    Array (    
    [0] => Array ( 
               [questionID] => 47
               [surveyID] => 51
               [userID] => 31 
               [question         


        
5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-26 02:23

    if($yourArr[0]['required']==0)  //Just check for first element in your array
      echo "Zero";
    else
      echo "One";
    

提交回复
热议问题