I m sure this has been asked before but I can t find it. The PHP documentation unclear on this and I can t find any examples like this. Is it legal to use variables in the declaration of an array use the array() construct? Not as keys, as the values. Like this:
function myFunc($value1, $value2, $value3) {
$myArr = array( value1 => $value1, value2 => $value2, value3 => $value3);
return $myArr;
}
Is that legal?