Top "Multidimensional-array" questions

Multidimensional-arrays can be described as multi-dimensional tables.

Getting the array length of a 2D array in Java

I need to get the length of a 2D array for both the row and column. I’ve successfully done …

java arrays multidimensional-array
PHP multidimensional array search by value

I have an array where I want to search the uid and get the key of the array. Examples Assume …

php arrays multidimensional-array
How to create multidimensional array

Can anyone give me a sample/example of JavaScript with a multidimensional array of inputs? Hope you could help because …

javascript multidimensional-array
How to sort an array of associative arrays by value of a given key in PHP?

Given this array: $inventory = array( array("type"=>"fruit", "price"=>3.50), array("type"=>"milk", "price"=>2.90), array("type"=>"…

php arrays sorting multidimensional-array
Initialising a multidimensional array in Java

What is the correct way to declare a multidimensional array and assign values to it? This is what I have: …

java multidimensional-array
How do you add an array to another array in Ruby and not end up with a multi-dimensional result?

somearray = ["some", "thing"] anotherarray = ["another", "thing"] somearray.push(anotherarray.flatten!) I expected ["some","thing","another","thing"]

ruby arrays multidimensional-array
in_array() and multidimensional array

I use in_array() to check whether a value exists in an array like below, $a = array("Mac", "NT", "Irix", "…

php arrays multidimensional-array
How do I iterate through each element in an n-dimensional matrix in MATLAB?

I have a problem. I need to iterate through every element in an n-dimensional matrix in MATLAB. The problem is, …

arrays matlab matrix multidimensional-array iteration
How do you rotate a two dimensional array?

Inspired by Raymond Chen's post, say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. …

algorithm matrix multidimensional-array
Initialize 2D array

I am trying to initialize a 2D array, in which the type of each element is char. So far, I …

java multidimensional-array