"Do" will do the trick. Repeat with tVarNum = 1 to 4 do "put"&&tArray&VarNum&"["&WrapQ("Text")&"] into tText"&tVarNum do "put"&&tArray&VarNum&"["&WrapQ("SomeOtherArrayValue")&"] into tSomeOtherArrayValue"&tVarNum end repeat
function WrapQ pString return quote&pString"e end WrapQ Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -----Original Message----- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Peter Bogdanoff via use-livecode Sent: Wednesday, February 01, 2017 6:14 PM To: How to use LiveCode Cc: Peter Bogdanoff Subject: Using a variable for an array name I have arrays: tArray1 tArray2 tArray3 tArray4 I want to get data from one of them: put “tArray” & “1” into tVar put tVar [“Text”] into tText1 tText1 is empty. Is there a way to get the data from the arrays without doing this kind of thing for each array: put tArray1 [“Text”] into tText1 put tArray2 [“Text”] into tText2 Thanks! Peter Bogdanoff _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode