If the code has knowledge at some point before that what the key value is going to be, then you can use a variable:
$key = 'response_name';
// . . .
if($data[$key]['resultset']['food'] == 0) {
If that's not feasible, then I guess I don't have enough information as to what is going on in order to supply a better answer.