php中如何判断某个value值在一个二维数组中?求最简单的方法
$arr=array(array("patientname":"啊啊啊啊啊啊啊啊啊啊","phonenumber":"啊啊啊啊啊啊啊啊啊啊","id":"86","sex...
$arr=array (
array (
"patientname":"啊啊啊啊啊啊啊啊啊啊",
"phonenumber":"啊啊啊啊啊啊啊啊啊啊",
"id": "86",
"sex": "男",
"Contact": "",
"diagnosis":"sss",
"visittime": "",
"visitdegree":"0",
)
,
array (
"patientname":"SdgedfE",
"phonenumber":"",
"id":"85",
"sex":"男",
"Contact": "",
"diagnosis":"sss",
"visittime":"",
"visitdegree": "0",
)
,
array (
"patientname":"degeS",
"phonenumber":"12222",
"id": "84",
"sex":"男",
"Contact": "",
"diagnosis":"ssss",
"visittime":"",
"visitdegree":"0",
));
$patientname="degeS";//这是从另一个php中传过来的值
$phonenumber="12222";
现在要判断这两个值是否存在上面的数组中,求最简单的方法,不想用循环遍历的方法,因为会和后面的功能冲突。谢谢,求代码。 展开
array (
"patientname":"啊啊啊啊啊啊啊啊啊啊",
"phonenumber":"啊啊啊啊啊啊啊啊啊啊",
"id": "86",
"sex": "男",
"Contact": "",
"diagnosis":"sss",
"visittime": "",
"visitdegree":"0",
)
,
array (
"patientname":"SdgedfE",
"phonenumber":"",
"id":"85",
"sex":"男",
"Contact": "",
"diagnosis":"sss",
"visittime":"",
"visitdegree": "0",
)
,
array (
"patientname":"degeS",
"phonenumber":"12222",
"id": "84",
"sex":"男",
"Contact": "",
"diagnosis":"ssss",
"visittime":"",
"visitdegree":"0",
));
$patientname="degeS";//这是从另一个php中传过来的值
$phonenumber="12222";
现在要判断这两个值是否存在上面的数组中,求最简单的方法,不想用循环遍历的方法,因为会和后面的功能冲突。谢谢,求代码。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询