【发布时间】:2013-07-20 15:55:52
【问题描述】:
如果我们有一个 if 语句,例如
`<?php if($data[1][0][1] == "aaa" || $data[2][0][1] == "bbb" || $data[1][0][2] == "ccc" || $data[2][0][2] == "ddd")
{
$return_value = {the index array value being passed above};
echo "which portion in the if statement OR was actually passed? and return that value" . $return_value;
}?>`
我们能否准确找出在 OR if 语句中传递的实际值?
【问题讨论】:
-
您的表达式的第一部分无效,应该是
$data[1][0][1]。和不。如果不分解 IF,就无法表明表达式的哪一部分为真。 -
谢谢!,只是想验证一下这个想法
标签: php if-statement return