【发布时间】:2018-12-02 06:18:28
【问题描述】:
我需要检查数组中的字段是否为空。我想知道PHP中是否有任何功能可以做到这一点。我试过empty(),但是因为它检查数组是否为空,所以它返回false,因为数组有字段。
以下数组如下:
"wm" => array:7 [▼
"make" => null
"model" => null
"version" => null
"portal_plan_id" => null
"portal_highlight_id" => null
"price_type_id" => null
"announce" => null
]
查看值是null,它们是我需要检查的值。
谢谢!
【问题讨论】:
-
很抱歉,我没有看到我在错误的网站上提问。
-
酷,酷,现在看来这是一个合理的问题。
-
您是否需要知道每个值是空值还是只有特定值?
-
每个值@NMahurin