Jump to content

Array to string from 2D array?


Recommended Posts

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! 

Link to comment
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

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

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

Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...