【发布时间】:2022-05-05 17:36:05
【问题描述】:
这是数组
$anArray = array(
"theFirstItem" => "a first item",
if(True){
"conditionalItem" => "it may appear base on the condition",
}
"theLastItem" => "the last item"
);
但是我得到了 PHP Parse 错误,为什么我可以在数组中添加一个条件,发生了什么??:
PHP Parse error: syntax error, unexpected T_IF, expecting ')'
【问题讨论】: