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).

learn more… | top users | synonyms

0
votes
3answers
23 views

Convert Two Comma-Delimited Strings into an Associative Array

I have two strings created by MySQL's GROUP_CONCAT: $a = "apple,banana,orange"; $id_number = "47,64,93"; The elements in the strings correspond to each other by their position i.e. apple has id=47, ...
0
votes
0answers
47 views

Most efficient way to pull information from a table

As a new-to-python person the only way that I can think of to grab information from a table (separated by only whitespace) is to call an item by its position using the row and column its located in. ...
0
votes
4answers
33 views

walking through php array

Can anyone point me in the right direction with the below I have this HTML in a FROM (simplified for this example): =============== Start HTML =================== <select name="Postage[]" ...
0
votes
2answers
14 views

Rearranging Array of WP_Post Objects and Arrays

After much time, I created a function that outputs an array of recent posts from any site in a WP multisite network. Now, I'm having trouble with getting this array in a format to easily write out ...
0
votes
1answer
11 views

PHP - search for a key value and then find the value of another key in the same object subarray

I've searched a lot for this, and found several similar questions, but none quite address what I'm trying to accomplish. I'm trying to write a code that will search a PHP (multi)multidimensional ...
-2
votes
5answers
38 views

reading mulltiple arrays in PHP

I need some help reading the values from multidimension arrays. The array looks like below. Array ( [translations] => Array ( [0] => Array ( ...
0
votes
0answers
29 views

Convolution of N-dimensional surface with vector in matlab

I am trying to do a 'convolution' of an arbitrary N-dimensional surface with a vector. More specifically, I am trying to get the output of an N-th order Volterra kernel (see ...
0
votes
0answers
7 views

How to pipe multi-dimensional array in Export-csv powershell 2.0?

How do I send a two dimensional array to Export-csv in powershell2.0? I can only make it use the first line of the array n times. I want each row/column to be the x,y piece of the array. I'm new to PS ...
0
votes
1answer
34 views

Turning an array element into a link, which acts like a “POST” method in a form.

I have a webpage which contains a form, like the following: <Form action=”search.php” method=”POST”> <fieldset> <legend> Enter your search below </legend> <textarea ...
-1
votes
3answers
37 views

multi-dimensional array from forminput

I think my solution is in a multi-dimensional array, but how... If i have the following (or similar) in a HTML form (simplified for example) <select name="Postage[]" id="Unique-ID"> ...
0
votes
2answers
43 views

Multidimensional array with random removal of key values with minimum 1 left

I want to create an array that I can remove randomly the content for the [id] key where they are the same [parent_id]. This is my array: Array ( [0] => Array ( [parent_id] ...
0
votes
5answers
40 views

Multiplying the main diagonal of a matrix with a number

My program has to receive a number k, a 4x4 matrix and k must multiply by the main diagonal of this matrix. The output should be the input matrix, however, the main diagonal of it multiplied by k. For ...
1
vote
1answer
23 views

numpy.searchsorted in a multidimensional array

I have got a three dimensional array with air pressure values in the form: [[[1000 1010] [1005 990]] [[950 960] [955 940]] [[900 910] [905 890]]] The structure represents the pressure at ...
-1
votes
1answer
19 views

php - How to convert 2d array into csv file with adding header

How can i convert my 2d array into csv file with adding header so user can upload the file directly. Here is my array Array ( [0] => Array ( [0] => 25/2/2013 ...
0
votes
0answers
19 views

fortran_storage_order() in boost::multi_array not working as expected

I'm trying to mimic some numpy/python code in C with the use of the boost multi array library. I read the documentation on the memory layout, but didn't understand well. In Python, to obtain a ...
0
votes
4answers
35 views

php - how to merge 2d array that have different no of element for each array

I have 2 set of 2d array and i want merge into 1 2d array. but the number of element in each array its not same and for the first 2 element is same and i don't want to duplicate it. here its is. ...
0
votes
2answers
24 views

multidimensional array function outputting garbage?

I have this function meant to initialize a multidimensional 2d (6x6) array to zero. I call the function in main using cout to test it and it outputs garbage. Please help. Thanks! int** ...
0
votes
2answers
35 views

How to map over a nested array

I have an array: my_array = [[1,2,3,4], [5,6,7,8], [9,10,11,12]] I want to iterate over each "cell" and change the value to something else. How can I do this without ...
0
votes
2answers
27 views

PHP strcmp & in_array Not Working

I am trying to see if an array contains a string, but am having a ton of problems - no matter what I do it always returns false. Basically I want to see if a stop on the train matches a particular ...
-2
votes
0answers
25 views

Javascript - Sort a multidimensional array into a new array [on hold]

Example of the 'Item' multidimensional array: Item (ID: 10342) Item[10342.Name] = 'Blue Box' Item[10342.Price] = 243.45 Item[10342.Size] = 'Large' Item[10342.Rating] = '3.8' Item ...
0
votes
3answers
45 views

Sort a multidimensional array in PHP

I have this multidimensional array, called $rent: Array ( [product2] => Array ( [dates] => Array ( [2013-07-25] => 2 ...
2
votes
3answers
29 views

How to separate keys of duplicate values in an array

I have an $my_Array which is dynamic. What should i do to get $Final_array based on $my_Array. $my_Array = array( ['arm'] => 'cc9f8eb4-e29f-44b4-8dcd-ac08e9b1faa6', ...
0
votes
3answers
32 views

PHP - merging 2D array by keys

How can I merge these array together? Array ( [0] => Array ( [type] => Person [relevance] => 0.700000 [count] => ...
1
vote
4answers
62 views

Code of neighbor finding program in C

The instructions are to Write a program that uses a two - dimensional array to find the elements that are larger than all their neighbors. For example if my input is: 1 2 11 13 5 6 7 6 9 ...
-1
votes
1answer
42 views

How to iterate a multidimensional json_decoded object in Perl to create a new json object?

I'm trying to recreate a php process in Perl and am not having much luck ( I don't know much Perl ). This is my php code: $json = ...
0
votes
2answers
24 views

Prepared Statements + MySQL (7 day Stats)

I'm currently working on a project in which I need to store 7 days worth of data for each individual object that a user creates, each object has a unique id as well as the user. I guess this is more ...
-2
votes
1answer
48 views

Has anyone ever seen this happen in a php freach loop? [on hold]

I built a multi-dimensional array from a query which has 101 keys When i echo $result['q101'] before a certain foreach loop it shows the proper data.. after this loop the array is modified somehow ...
0
votes
2answers
34 views

php dynamically create multi dimensional array

I am writing a php script to extract some data from a MYSQL db, then I want to take that data and store it into a two dimensional array. Thinking of it normally, if I use code like this $test = ...
0
votes
4answers
52 views

PHP Multidimensional Arrays , display data in a tabular form

When I echo the array , result is : $Items = Array( [147] => Array([ItemName] => Array([0]=>White Snack [1]=>Dark Cookie) [ItemCode] => Array([0]=>IT-WS [1]=>IT-DC ) ) [256] ...
0
votes
1answer
17 views

Getting Unique Values in Multidimensional Array PHP

I have an array similar to this: array(5) { [0]=> string(2) "32" [1]=> string(2) "67" [2]=> string(19) "2013-07-15 15:56:28" [3]=> string(1) "1" [4]=> string(4) "Fail"} array(5) { ...

1 2 3 4 5 211
15 30 50 per page