Posted by Bosconian on 07/19/05 06:30
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!
[Back to original message]
Copyright © 2005-2006 Powered by Custom PHP Programming