Value to variable name

HNJAMeindersma:
I get the feeling that it pastes the outcome of "sp_check" as plain text. However; this plain text ("sp_sw3", "sp_sw4", "sp_ir8") should then be turned into the var name of the array to call for its information. (In case of "sp_ir8": label "TV" and IR code for 'turn on' "00x1abc").

It doesn’t work that way. Variable names only have significance at compile-time. At run-time all you have is memory addresses.