我有一個數組下面,我需要訪問checkbox3數組,並找出它是否設置。訪問多維數組值
像這樣的事情,但它不工作:
<?php if(isset($fields['checkbox3']["One"])): ?>
One is set
<?php endif; ?>
array(2) {
["checkbox2"]=>
array(1) {
[0]=>
string(10) "Don't Show"
}
["checkbox3"]=>
array(5) {
[0]=>
string(3) "One"
[1]=>
string(3) "Two"
[2]=>
string(5) "Three"
[3]=>
string(4) "Four"
[4]=>
string(5) "Five"
}
}
感謝邁克,你說的最快,所以我會在6分鐘內接受你的答案 – 2011-03-22 23:53:03
聽起來不錯。祝你好運,你在做什麼! – 2011-03-22 23:53:29