I have a simple (in my opinion) question. I try to initialize an array in php as follows:
array(
'type' => 'hidden',
'id' => "request_params$suffix",
'name' => "request_params$suffix",
'value' => "?rule_id=$rule_id&cur_instr=$cur_instr&dev_id=$dev_id&cmd_id=$cmd_id" + ($disabled? '&disabled' : ''))
This construction is passed as a parameter in a function call. All of the variables are defined. And as a result I get the type
, id
and name
are initialized well, but the value
is initialized with 0. If I comment out the + ($disabled? '&disabled' : '')
then the value
initialized too. I had tried to enclose all the expression in parenthesis with the same result -- initializing with 0.
Has anybody any idea?