【发布时间】:2015-10-26 12:54:48
【问题描述】:
嗨,我有如下给出的数组,我需要运行逻辑条件。 请建议我如何运行此代码,然后输出将匹配数组条件。
Array
(
[0] => Array
(
[match] => FALSE
[coundition] =>
)
[1] => Array
(
[coundition] => or
[match] => TRUE
)
[2] => Array
(
[coundition] => and
[match] => FALSE
)
[3] => Array
(
[coundition] => and
[match] => TURE
)
)
想像
if($match[0]==TRUE || $match[1]==TRUE && $match[2]==TRUE && $match[3]==FALSE )
{
$output=1;
}else
{
$output=0;
}
【问题讨论】:
-
应该是
$myArray[0]['match']而不是$match[0]来获取match键的值。
标签: php arrays codeigniter