Hi Guys,
I had a quick question about referencing array elements.
I wanted to create a "shortcut" to a specific array element as a reference so as to Not create a copy of the data.
I just wanted to make sure that I understood this correctly.
Thanks.
Sample code:
I had a quick question about referencing array elements.
I wanted to create a "shortcut" to a specific array element as a reference so as to Not create a copy of the data.
I just wanted to make sure that I understood this correctly.
Thanks.
Sample code:
Code:
$aData['texas']['dealer']['color']['red']="yes";
$aData['texas']['dealer']['color']['blue']="no";
$aData['texas']['dealer']['color']['green']="maybe";
$ref_colors = & $aData['texas']['dealer']['color'];
print $ref_colors['red'];
output: yes