• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 699
  • Last Modified:

Use selected index value to retrieve value in array

I have a multi dimensional array as follows:

arr[0] = [500,40,50,10,7.5];
arr[1] = [1000,40,80,10,12];
etc

and the value of a selected index, x
I want to compare x to the array in such a way that allows me to find the 3rd value in the row that corresponds to the value of the selected index

So, it x =1 I want to retrieve the value 80
0
Wayne9999
Asked:
Wayne9999
1 Solution
 
DanRollinsCommented:
The third value is the one with index 2 (0,1,2)  so...
value= arr[x][2]
 
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now