My system sends a configuration array to a function like this:
callThatFunction( array(k1 => v1, k2 => v2, ... kn=vn));
I want to make one of the key value pairs, conditional upon some circumstances.
Can I do this without creating a variable for the array (and this breaking the clean config syntax that someone else had created)?
Like this
callThatFunction (
array(
k1 => v1,
if($cond( {k2 => v2,}
...
kn=vn
)
);
The above is obviously wrong syntactically, but should express my idea.