# total number of rows in a multidimensional array

nitinram agarwal

Ranch Hand

Posts: 90

posted 5 years ago

Hello everyone,

I have a multidimensional array and would like to know what is the depth of it? For ex given the following 2 dimensional array

the total number of rows is 6. I would like to know if there is a direct way of determining the depth of a multi dimensional array. As of now, I am iterating through the array and computing it. for a one dimensional array, "length" gives me the total number of columns and I am looking towards something similar for row numbers.

I have a multidimensional array and would like to know what is the depth of it? For ex given the following 2 dimensional array

the total number of rows is 6. I would like to know if there is a direct way of determining the depth of a multi dimensional array. As of now, I am iterating through the array and computing it. for a one dimensional array, "length" gives me the total number of columns and I am looking towards something similar for row numbers.