Questions tagged as 'array-multidimensional'

3
answers

Sort a multidimensional array with numeric values

Let's suppose the following situation in which I have array composed of several array with numerical values: $array = array( array(22, 25, 28), array(22), array(22, 23) ) I would like to leave this array ord...
asked by 31.01.2014 / 17:05
3
answers

Group values from an array in PHP

I have a grid-shaped form that returns the following values inside an Array: array (size=3) 0 => array (size=5) 'pei_seq' => int 0 'prg_cod_barra' => string '7899619704729' (length=13) 'pei_prg_cod' => stri...
asked by 06.03.2015 / 13:50
3
answers

sort array multidimensional php

I have the following array returned from a webservice (in the image I identify what I want, below the text to copy paste if necessary): Array([DataTable]=>Array([ID]=>STOCK[Line]=>Array([0]=>Array([Fields]=>Array([0]=>Array([F...
asked by 27.04.2016 / 17:54
3
answers

Merge arrays in php

Someone knows something that makes this: $name = [0=>'name1',1=>'name2']; $email = [0=>'email1',1=> 'email2']; In this here? $data = [ 0 => ['name'=>'name1', 'email'=>'email1'], 1 => ['name'=>'name2', 'email'=&...
asked by 02.08.2014 / 22:10
1
answer

Mount a two-dimensional array from another array

I have the array $dados below: array(5) { [0]=> "2018-03-28" [1]=> "jantar" [2]=> "lanche" [3]=> "2018-03-29" [4]=> "lanche" } From this array, how could I mount another two-dimensional array so that it...
asked by 27.03.2018 / 21:48
3
answers

Working with array with X layers in JS

I have a big problem, I already researched in several places and I did not find the solution I hope you can help me ... My goal is to create a function in JS that will get an array as a base, which I will call here as " A " its structure is this...
asked by 01.07.2015 / 21:25
4
answers

Sort a multidimensional array by one column, keeping the same array rows

I have an array with two columns, where in the first column I have the name of a station, and in the second I have the address of the station. I need to sort this array in alphabetical order of the station name, without losing the associated...
asked by 29.06.2015 / 15:29
3
answers

Simplifying an Array - PHP

I have a multidimensional array where the data is as follows: Array ( [0] => Array ( [0] => Array ( [0] => Brasil [1] => Franca [2]...
asked by 04.07.2016 / 22:49
3
answers

Multidimensional array of different types

I have a view in the bank of my application where I count the user's name, his sector and the total number of records issued (tale from another table):    TotalPorUsuario (View) Table       Columns: name (string), sector (String), total (i...
asked by 15.03.2016 / 15:20
2
answers

Recursive method or loop to populate or list an n-dimensional array

I'm trying to construct a method able to fill an n-dimensional array at all positions, for example: I have a 2-dimensional array, where that array is 2x2 with only 2 dimensions on a Cartesian plane, for example. I would like the same method t...
asked by 13.11.2017 / 02:32