Jump to content

Making double arrays


Recommended Posts

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

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...