Are you referring to changing
$a['reffirst'] = &$a['firstval'];
to
$a['reffirst'] = $a['firstval'];
??
If that's the case, then that definitely won't work. That reference has to be in place, otherwise the script doesn't work. That would result in reffirst making an immediate copy of firstval, which comes with an empty string. What I need to happen is whenever firstval is updated, reffirst is updated too. For clarification, this bit of code is used for a templating engine. I might have a template that looks something like this:
This is the $TITLE$ template for $CATEGORY$. If you'd like to look at other templates for $CATEGORY$, please go here.
The block of text is broken up into an array, with (in this example) the first and second references to $CATEGORY$ being firstval and reffirst, respectively. If, in my parser, I decide that $CATEGORY$ = 'banana', then I can assign that to firstval, and reffirst will 'see' it since it is pointing to the other array value, not just copying it.
And of course, this works just fine with one array, but if you copy the array after it's been initialized (but not filled with values such as 'banana'), then you get the abovementioned mixup with references reaching across the arrays.