I've been researching this for hours and can't seem to find the right
syntax.
I need to retrieve a value of an array by referencing the element using a
string variable.
For example:
$data['lastname'] = 'hank';
$element = 'lastname';
echo $data[$element];
Outputs:
hank
Seems straightforward enough, but the solution escapes me.
Someone clue me in--thanks!