Sign in to follow this  
Followers 0
rickybobby

Array to string from 2D array?

4 posts in this topic

I have a 2D array, and I'm trying to only get a value out of one single row/column; say $array[1][0] which should be = Jane. 

I've just figured out that Arraytostring does not work with 2D arrays, how should I go about getting this value?

Thank you! 

Share this post


Link to post
Share on other sites



_ArayToString is used to extract all the elements (or a part) of an array (1D) to a single string, separated by a delimiter

if you need to use only one element of the array then just use it by referring to it by his indexes

for example:

$MyVar = $array[1][0] will pass the value of the element [1][0] to the var $MyArray

or just use it directly:

msgbox(0,"Example",$array[1][0] ) will show you the value of that element


small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Share this post


Link to post
Share on other sites

_ArayToString is used to extract all the elements (or a part) of an array (1D) to a single string, separated by a delimiter

if you need to use only one element of the array then just use it by referring to it by his indexes

for example:

$MyVar = $array[1][0] will pass the value of the element [1][0] to the var $MyArray

or just use it directly:

msgbox(0,"Example",$array[1][0] ) will show you the value of that element

 

I'm trying to pass the var to a command line string that runs a console program; so when I pass the value of that element it's still somehow not getting passed as a string.

Share this post


Link to post
Share on other sites

$MyVar = String($array[1][0])

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0