Multidimensional-arrays can be described as multi-dimensional tables. Each index used in order to find a given element is called a dimension.
-2
votes
1answer
39 views
how do I mount this type of array in php?
how do I mount an array in this format with php?
array(6) {
[0]=> array(2) {
[0]=> int(10)
[1]=> string(10) "2014-09-02"
}
[1]=> array(2) {
[0]=> ...
0
votes
2answers
26 views
Arranging multi-dimensional array populated from different sources
I'm populating a multi-dimensional array from different sources.
This is my array structure:
$feeds[$source][$indexLoop]["Link"] = $link;
$feeds[$source][$indexLoop]["User"] = $username;
...
0
votes
3answers
27 views
Is it ok to use variables at the second level of a multi-dimensional array? Additionally, how do I echo it?
To describe my question a little more in detail, can I use variables (i.e. $player1) at the second level of my multidimentional array?
If so, how do I echo $player1["name"] and $player1["age"]?
Is ...
0
votes
0answers
4 views
Parse.com Multi-Dimensional Query
My database set-up in Parse is:
**Promo Class**: *promoGroup* - pointer to Promo_Groups Class
**Promo_Groups Class**: *users* - pointer to _User Class
Promo codes can be part of a "group" so that ...
0
votes
3answers
22 views
Javascript - how do i do a array group and count it, like in MySQL group by given column id?
i have a large array as bellow, now i need to do a group by first column and count the total of that channel existence.
For example:
var original_db = [
["channel1", "online"],
["channel2", ...
0
votes
1answer
24 views
Is it possible to add two multi-dimensional arrays together to a third multi-dimensional array
I am attempting to add two multi-dimensional arrays together into a third array without much success.The first two arrays I created have values and I am unsure of exactly how to add multi-dimensional ...
2
votes
2answers
55 views
Create multidimensional array from keys
Is there a way to create dynamicaly multidimensional array? I have stored in database "path" for each field=>value like that:
field_name : [slideshow][slide][0][title]
field_value : my title
...
0
votes
0answers
49 views
Weird output from printing out the contents of an array
I'm currently pushing in the values to an array from std_input but am not getting anywhere near the right point, for some of the points of the 2d array.
Feeding it the input A={0,1,...,8,9} from a ...
0
votes
1answer
17 views
Is it possible to display two multi-dimensional arrays next to each other using a for loop
I am trying to output multiple multi-dimension array in C++, and need a little help understanding on why and how for loops display output where they do. I would like my first multi-dimensional array ...
20
votes
6answers
999 views
Why doesn't Java have true multidimensional arrays?
The TL;DR version, for those who don't want the background, is the following specific question:
Question
Why doesn't Java have an implementation of true multidimensional arrays? Is there a solid ...
1
vote
2answers
31 views
Allocation of 3-dimensional array
I tried to write a funtion to dynamically allocate a 3 dimensional array but my program crashes. Is Here is the code:
#include <stdio.h>
#include<stdlib.h>
int*** funcao(int a,int b,int ...
0
votes
3answers
32 views
extract and group data from a multidimensional array
I want to print out information from a multidimensional array.
Here is my array structure:
// A two-dimensional array
$cars=array
(
array('service' => "Windows8",'host' => Sydney1,'state' ...
-2
votes
1answer
19 views
Summarize multidimensional PHP array by specific key name
I am trying to summarize a php multidimensional,
I have an array structure like this;
Array
(
[0] => Array
(
[product_id] => 1
[product_name] => Product1
...
0
votes
2answers
36 views
PHP sorting a multidimensional array by key and non-zero values
[a, 1, 3, 9, 0, 13]
[b, 5, 6, 0, 0, 11]
[j, 0, 6, 2, 1, 9]
[c, 1, 0, 8, 5, 14]
[d, 0, 0, 0, 17, 17]
[e, 0, 5, 0, 0, 5]
[h, 0, 0, 3, 3, 6]
The array needs to be sorted on
Ascending order of number ...
-2
votes
0answers
30 views
What is the fastest way to use values from nested (dimensional) arrays? Array iteration or separate arrays? [on hold]
I'm interested in getting your help understanding 2 things here. The first is because I'm curious to understand how that will relate to my second (and very important) question.
1) Exactly what the ...
1
vote
1answer
30 views
NumPy: create bool array like “repeat” but in multiple dimensions
I'm looking for sort of the opposite of sum() I guess. Here we go:
x = array([
[False, False, False, False, False],
[ True, False, False, False, False],
[ True, True, False, False, ...
0
votes
0answers
16 views
implementing multidimensional array using list [duplicate]
The output in line 4 should be [[],[2],[],[],[]]. I m not able to understand what am I doing wrong .As I only want to append value 2 in second position of list a . But it has added 2 to all the ...
0
votes
1answer
21 views
Looking for words in a 2D array of chars in java. Why am I having search problems if certain parts are not commented out?
I have this method that searches for a word from an array of words in a grid of characters. It searches left to right, right to left, up to down, down to up, vertical up to the left, vertical up to ...
0
votes
3answers
28 views
I am trying to search up to the right diagonally in my multidimensional array in java. Why am I getting index out of bounds error?
I am trying to search up to the right diagonally in my multidimensional array of characters in java. I added in an if statement to make sure it stays within the bounds of the array, but I am getting ...
0
votes
3answers
37 views
Xpages Repeat return Multiple Array
I think I want something impossible, but I'll give it a try.
I have the following code:
<xp:repeat id="repeat1" rows="30" var="rowData" repeatControls="false" indexVar="index">
...
1
vote
5answers
48 views
Combine array in PHP with values
Consider the below multi dimension array:
Array
(
[submit] => yes
[id] =>
[booking_id] =>
[booking_type_id] => Array
(
[0] => 171
[1] => 58
)
[value] ...
-1
votes
1answer
36 views
C++ - Using multidimensional arrays with variable arguments in a header file
I declare and define several variables that should be read and write by all the other files in my program in a header called "variables.h".
variables.h
const int N;
const int M;
extern double ...
1
vote
1answer
21 views
MySqli query to multidimensional array
I am trying to convert the results from a MySQLi select to a multidimensional array but am not getting the desired result. This is the data returned from the SELECT statement:
+----+------------+
| ...
-1
votes
2answers
33 views
I'm in java looking for a string in a multidimensional array of characters, but my search stops after different characters for different words. Why?
So I have a multidimensional array in java that holds a grid of characters. I am trying to match a string to characters in the grid. So far I have implemented searches for left to right, right to ...
3
votes
2answers
31 views
Multidimensional arrays From C to Swift
In C I have the following multidimensional array:
unsigned wins[8][3] = {{0,1,2},{3,4,5},{6,7,8},{0,3,6},{1,4,7},{2,5,8},{0,4,8},{2,4,6}};
To access the elements I use the following code:
int i;
...
1
vote
4answers
48 views
Sum of all numbers in a multi-dimensional array
I'm currently learning C# and running into some trouble with multi dimension array.
I can't seem to figure out how to find the sum of all the elements in the array. E.g
int[,] array = { { 52, 76, ...
2
votes
2answers
26 views
When I try to return the index values of an item in a multidimensional array, I do not get numbers. I get a weird set of characters. Why?
I have this code below that is supposed to return the index values of an item in a multidimensional array. However, when I run it, it gives me back this instead:
Found at: [I@7ea987ac
public ...
-1
votes
2answers
32 views
How to initialize a multidimensional array ([][]) with no values in java?
So I'm writing a Maze solver, and in my maze class I'm using an array of arrays of a custom "square" object for the 2d grid of the maze.
public class Maze {
int height;
int width;
Square[][] grid; ...
0
votes
2answers
13 views
Wordpress: Separate meta fields vs single array field
I have 200 fields in for a single post. I was wondering if to put them into 1 single field as an array or multiple fields. Single array has a lot of work to be done for getting the value unlike ...
0
votes
1answer
35 views
Is there a simplier way to un-nest an array?
All,
How would you "un-nest" an array to make it easier to loop through?
How would you convert the array below...
Array
(
[0] => Array
(
[0] => Array
...
0
votes
1answer
20 views
I am trying to search my java multidimensional array from bottom right to top left going in a vertical pattern? What is wrong with my code?
I am trying to search my java multidimensional array from bottom right to top left for a word going in a vertical pattern, but it is not finding the word. What am I doing wrong?
public static ...
-5
votes
0answers
39 views
PHP split string into multidimensional array [on hold]
I have this string:
"{ text1 { text2 { text3 } | text4 { text5 { text6 | text7 }}}. text8 { text9 | text10 }. }"
I want this output:
text1 text2 text3. text8 text9.
text1 text2 text3. text8 ...
0
votes
1answer
27 views
Refill multidimensional array in php
Does somebody knows how I can refill this kind of array? I need to insert some values instead of the 0.
I make two loop, one for creating the array structure, and the another for filling the array, ...
0
votes
2answers
27 views
Handling PHP Array post values and merging - PHP Arrays
I know this won't take much time for experts here. But still please help me out
My Array output is like this
Array ( [0] => 1 [1] => 37 [2] => 1035 ) 1
Array ( [0] => 1 [1] => 37 [2] ...
0
votes
0answers
22 views
Classes - 2-d Array - Properly Declaring within .h and .cpp files
I am not sure what I am doing wrong. When I compiled the header with the implementation in one file it worked, but when I split it into a header file and an implementation file it does not recognize ...
0
votes
2answers
34 views
I am trying to search my java multidimensional array from top left to bottom right going in a vertical pattern. What is wrong with the code I have?
I am trying to search my multidimensional array that is a 6x8 grid from top left to bottom right in a vertical pattern for a word, but I can't figure out what's wrong with my code. Can someone tell me ...
0
votes
2answers
57 views
Move elements in a multidimensional array
I'm keeping track of a character's position on a game board through the use of a multidimensional array (board[10][20]). To allow for user movement, I have created a method, movePlayer(), that ...
0
votes
1answer
26 views
Search Boolean in List Multidimensional C # and assign value
I have a question and do not find how to get the best way to iterate without assigning a value "True" or "False" in a list Multidimensional (2 columns). In other words, if all are "TRUE" assign ...
0
votes
1answer
16 views
How would I modify my code to search a multidimensional array diagonally from left to right and right to left?
I have this code for searching a multidimensional array from left to right and right to left.
What I need to do now is to search the array from the top left to the bottom right,the top right to the ...
2
votes
2answers
46 views
JavaScript: Removing duplicates in an array of arrays
Currently using JavaScript and I need to go through an array of arrays to determine if there are any duplicate arrays, and then deleting those duplicated arrays. Runtime is of the essence in this ...
0
votes
2answers
41 views
Array index out of bounds - converting 2d to 1d [on hold]
I'm not really sure as to why I'm getting an Array Index Out Of Bounds Exception. To my understanding, my double array is of size 3, so the index goes from 0 - 2. In my isSolvable method I try to ...
0
votes
2answers
16 views
Numpy boolean indexing with multiple dimensions. Why won't it select rows and columns?
I have an ndarray with n>1 dimensions. I have a boolean array ok0 corresponding to the rows I want to select, and another boolean array ok1 corresponding to the columns I want to select. I want ...
0
votes
2answers
55 views
Do I have to free all the pointers to the same structure?
I have an array-like structure made using singly-linked lists. If I want to remove a certain cell, do I have to free the pointer pointing to it row-wise and column-wise?
My structure looks like this:
...
2
votes
2answers
52 views
Store value in multidimensional array if value is equal to key
I'm trying to store the numbers associated with the music values below
Store 2797 in house
Store 2797 in rnb
Store 2797 in hiphop
Store 2829 in house
Store 2829 in trap
Store 2829 in hiphop
Into ...
0
votes
1answer
17 views
Splitting txt file delimited by tabs into multidimensional associative array
I currently am trying to read an input file that looks like this:
annie Tuesday October 7 at 08:32 pm 1 Cappuccino 2.5
It is delimited by tabs. I am trying to read from this file, called ...
1
vote
2answers
84 views
Insertion of non aligned elements in 3-dimensional matrices in numpy
I'm working with 3-dimensional matrices using numpy 1.9 and python 2.7.5.
Here is an example:
>>> A
array([[[ 1., 1., 1.],
[ 1., 1., 1.],
[ 1., 1., 1.],
[ 1., ...
0
votes
1answer
9 views
Add additional associative array in 2x2 multidimensional array but perserve key
Howdie do,
I have one multidimensional associative array of server types. This array contains a sub array of values.
It's easier to see:
$servers = array('Dell R410 Dual Xeon X5650 Hexacore 2.66 ...
1
vote
1answer
39 views
Search a 3d Array
I need help with inputting a search array. I tried putting a binary search but I can't get it to work. everything else works up until I put the value I am searching for in the array, then it just ...
0
votes
1answer
14 views
Trying to search a grid of characters in java for a specific word. How can I search from right to left after searching from left to right?
I have the following code to search a grid of characters below from left to right to find a word. This works perfectly.
// Left to Right
public static String findLeftToRight (char[][]board, String ...
1
vote
2answers
32 views
Are there such things as dymanic-dimensional arrays in JavaScript?
What I mean by dynamic-dimensional arrays is multidimensional arrays that can have various dimensions. I need to create a function that does something to elements of multidimensional arrays, ...