Multidimensional-arrays can be described as "arrays of arrays". Multidimensional-arrays are often used to put values in a table format (e.g. rows and columns).
-1
votes
5answers
77 views
print an array whose length and dimensions are unknown
I was asked at an interview to print all the elements of an array whose length and dimensions are unknown. i could not find a way but the interviewer said that it can be done. can any one tell how it ...
-1
votes
1answer
26 views
How the correct code to join/merge a multidimensional Array in single array and then implode them (use PHP script)?
PHP
$input = array(array());
$bill = array();
for ($i=1; $i<=$count; $i++) {
$input[$i][0] = $_GET["item$i"];
$input[$i][1] = $_GET["price$i"];
$bill[$i] = $input[$i][0]." - ...
0
votes
3answers
36 views
php multidimensional array sort
I have this multidimensional array
I am wondered how can i sort this array again so i can use it in for loop.
array (size=3)
0 =>
array (size=1)
0 =>
array (size=7)
...
0
votes
0answers
3 views
Jquery datepicker highligh dates from multidimensional array
I am new to jquery, javascript, ajax & allied stuff but aware of the basic building blocks for website deigning. I was trying to use datepickers beforedayshow to try and highlight days with ...
0
votes
1answer
36 views
How to apply a function over rows in a list of arrays
I have not been able to get a solution to my problem yet despite discussing it with several people so hopefully the community here can be of help.
The data is stored as a list of arrays. Each ...
0
votes
2answers
41 views
how can I decide the dimension of an array according to the input in Java
For example, I have an input N(you don't know until running time), and I want to build an array with N dimensions.
I cannot define the number of dimensions when I write my code like when we ...
0
votes
0answers
44 views
PHP Multi level dimensional array
According to this link here I wrote a similar answer as in bottom. Wonder if there is more generic and compact way of writing the solution?
$multi_d = array();
$read_conf = parse_ini_file($filename);
...
0
votes
1answer
20 views
Remove duplicated values from nested array
I'm getting stack-removing duplicated keys and assigning them to a new array.
My array:
array (
[1] => Array
(
[name] => name1
...
0
votes
1answer
32 views
I want to move items within a two dimentional array in Java
I am making a backgammon game and I have the board setup using a 2D array like so:
stoneCounts[0][0]=stoneCounts[0][1]=stoneCounts[0][2]=stoneCounts[0][3]=stoneCounts[0][4] = W;
...
1
vote
1answer
31 views
Multidimensional array output
So I have this array data which i want to be coded somewhat like [lojas, raparacoes, valor],[nome_1, count_1, val_1],[nome_2, count_2, val_2], etc, etc...
lojas, reparacoes and valor are like headers
...
0
votes
2answers
35 views
Create a multidimensional array in javascript
i'm not really sure, how to explain this, but i trying to create a multidimensional anonymes array in javascript. I'm new to Javascript and mostly did jQuery stuff so far. But now i need this and what ...
2
votes
1answer
25 views
Multidimensional PHP array stays empty
I'm trying to create a multidimensional array within a PHP function. But it doesn't seem to work. The function I wrote:
//Get newsitems
function getNews() {
$result = mysql_query("SELECT * FROM ...
6
votes
3answers
2k views
efficient way to represent a lower/upper triangular matrix
I am working on my data in a C/C++ program, which is 2 dimensional. Here my value is calculated for pair-wise and here values would be same for foo[i][j] and foo[j][i].
Thus if I implement it by ...
0
votes
0answers
33 views
4th dimension Plot Matlab
I'm new using matlab and I'm having some troubles, I hope someone can help me.
Until now I was working with two var functions, like F=x+y;
x and y goes from 1 to 4 so I used ...
0
votes
0answers
20 views
How can I print Stripe invoice list in a HTML Table with php?
I want to see all invoices in a html table for a customer with stripe PHP API
Here is the url of API
Output like:
Array( "data" => Array( [0] => { "date": 1373505962, "id": ...