Jump to content

Is this possible?


antmeeks

Recommended Posts

Sorry, I guess I wasn't clear...

 

I'm not trying to make a multidimensional array out of 3 other arrays, I'm trying to consolidate the compounding of multiple array key values into one variable.

 

Literal from my example:

 

variable '$b' = the value of array1's key that equals whatever is assigned to '$a':

$b=$Array1[$a]

 

variable '$c' = the value of array2's key named the value of variable '$b':

$c=$Array2[$b]

 

variable '$d' = the value of array3's key named the value of variable '$c':

$d=$Array3[$c]

 

So... is it possible to build up the value of var $d with one statement instead of 3?

Link to comment
Share on other sites

Doh! I just figured that out right before your post....

 

You know it's getting late when you post in a forum before even trying it out first...

 

What I wanted to do was nest the arrays into one var - which, as you say, my original post was a completely valid example of:

 

$d=$Array3[$Array2[$Array1[$a]]];

 

:-[ Time for bed.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.