Try this:
$POST[$POST['foo']]
That will pull the form element specified by the "foo" form element.
Be aware though, that this kind of indirection can sometimes be dangerous. $POST[$POST['foo']] should be okay because it only allows users to access variables they have submitted themselves, but something like this:
$GLOBALS[$POST['foo']]
would allow the user to access any global variable. That would be bad if you have any important information in any global variables (database password, for example).