Why do you say he should use arrays, when we did not explain why he needs to do it this way. Maybe the data is coming from the source he has no control of. Arrays are completely irrelevant to the question.
"Maybe the data is coming from the source he has no control of." - because evaluating the 3rd party data is terrible practice. 3rd party data should never interact with real names of variables/functions/whatever - the only possible way to interaction is to work with data.