Sign in to follow this  
Followers 0
Garrett19212

Making double arrays

6 posts in this topic

How can I make an array like $i[0][0]

Share this post


Link to post
Share on other sites



there are many answers to that question

give an example of how you are going to use it... there may be an automated way to do it

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

How can I make an array like $i[0][0]

This will make a two dimensional array:

;)

$var = WinList()

Probably not the one you want, but as Valuater said, NEI...


...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ill be setting the arrays to the stuff I want, sorta like.

$var[1] = "hello"

$var[2] = "bye"

$var[1][1] = 1

$var[2][1] = 2

I have an array of values and im assigning 1 or 2 to it to dertermine yes or no.

Edited by Garrett19212

Share this post


Link to post
Share on other sites

Ill be setting the arrays to the stuff I want, sorta like.

$var[1] = "hello"

$var[2] = "bye"

$var[1][1] = 1

$var[2][1] = 2

I have an array of values and im assigning 1 or 2 to it to dertermine yes or no.

That helps a little. Look in the help file under "dim". There are examples of arrays in there.

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format

Share this post


Link to post
Share on other sites

One thing to note is that if you have a two-dimensional array, you can't do this:

$var[1] = "hello"
$var[2] = "bye"

since that's one-dimensional array talk. You can however do this:

$var[1][0] = "hello"

$var[2][0] = "bye"

$var[1][1] = 1

$var[2][1] = 2

You can also do this (note the numbering):

$var[0][0] = "hello"
$var[0][1] = "bye"

since arrays' elements start from zero.

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