58hoo Posted December 22, 2006 Share Posted December 22, 2006 I would like to concatenate some numeric variables (values 0 thru 9) to produce an index into an array. For example, I have three variables: Global $Var1 Global $Var2 Global $Var3 $Var1 = 0 $Var2 = 8 $var3 = 4 Concatenating these ($Var1 Var2 Var3) to produce 084 which I would then use to index an array. Is there an easy way to do this? Thanks, Link to comment Share on other sites More sharing options...
Valuater Posted December 22, 2006 Share Posted December 22, 2006 maybe... Dim $c1[4] $c1[0] = 4 $c1[1] = 1 $c1[2] = 2 $c1[3] = 3 Dim $array[2] $array[1] = $c1[0] & $c1[1] & $c1[2] & $c1[3] MsgBox(0x0, "Test","1=" & $c1[0] &@LF & _ "2=" &$c1[1]&@LF & _ "3=" &$c1[2]&@LF & _ "4=" &$c1[3]&@LF & _ "or " &$array[1] ) 8) Link to comment Share on other sites More sharing options...
theguy0000 Posted December 22, 2006 Share Posted December 22, 2006 couldnt you just... $concatenated = Int ($var1 & $var2 & $var3) ? The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN Link to comment Share on other sites More sharing options...
58hoo Posted December 22, 2006 Author Share Posted December 22, 2006 Thanks! Both suggestions work great. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now