我的英語發佈對此非常抱歉。使用in_array在多維數組中搜索
我有一個數組:
Array ([name] => Array
(
[0] => Sorry the name is missing!
[1] => Sorry the name is to short!
)
)
現在我想用in_array爲如 「名」,以測試。
if (in_array("name", $false["name"])) {
echo "the array keys";
}
但它dsnt的工作。請annybody幫助我嗎?非常感謝。
當您測試* name *時,測試的結果應該是什麼?那個* name *是一個數組還是一個字符串? – hakre 2012-01-04 14:06:08