Questions tagged as 'array-multidimensional'

2
answers

Sorting all elements of a multidimensional array

I need to sort the array below in alphabetical order using the numeric key: Array ( [AM] => Array ( [1] => Array ( [localidade] => Arena da Amazonia [cida...
asked by 23.06.2016 / 18:59
2
answers

How to mount this multidimensional array via foreach

I'll only put the part where I'm having problems! The% w / w I need, needs to be in this format. Example 1: Array ( [atributos] => Array ( [atributo] => Array ( [nome] =&...
asked by 25.08.2015 / 08:04
1
answer

Split two-dimensional array into 2 simple arrays - PHP

I'm making adaptations in an old system and need to create a new routine to split a two-dimensional array into 2 simple arrays. Let's say that the variable $query receives the array below: $query = array("SELECT * FROM teste WHERE no...
asked by 22.04.2015 / 19:21
1
answer

How to declare a multidimensional array using new

How do I declare a multidimensional array using new? A normal array looks like this: int* ponteiro = new int[5]; But int* ponteiro = new int[5][5]; Do not compile! but int array[5][5]; works perfectly.     
asked by 29.05.2018 / 19:30
1
answer

How to access an item in an array of objects? [closed]

I'm getting information from the database and putting it in an array: (more details of the code) var alunos = {}; var self = 0; function sortearAluno(){ var dataForm = {'tipo': "listar"}; $.ajax({ type:'post', data: d...
asked by 18.09.2016 / 10:14
1
answer

How to simulate this PHP function in jQuery?

The below function in PHP will return me an array where the searched word fit, how can I do the same with jQuery? $meuArrayMultidimensional = array(array("campo" => "teste"), array("campo" => "valor qualquer"), array("campo" => "teste...
asked by 24.11.2016 / 23:29
1
answer

Array conversion to two-dimensional array using parameter

I have a question regarding the conversion of vectors (array) to two-dimensional vectors. I need to read a string and separate the columns when there is a blank space. I did this using the split() method and it's already ok. However, w...
asked by 19.08.2018 / 16:09
1
answer

retrieve a client name in a multidimensional array

I am creating a script to execute procedures in the database of some clients, I have the following arrays with the credentials of each one: $hosts["Cliente1"] = array("ip"=> "ip_do_cliente", "usuario" => "usuario","senha" => "12345",...
asked by 12.01.2018 / 20:29
1
answer

Doubt about filling a two-dimensional array in Java

I'm doing an exercise and I need help. Here is the statement:    Calculate the average temperatures of each month. To do this, create a list containing the names of each month in the rows, and the number of days of each month in the columns....
asked by 10.07.2016 / 03:09
1
answer

Sort array of objects [duplicate]

I have the following data as a result of querying the database: Array ( [0] => stdClass Object ( [id] => 1 [nome] => Pizzaria 1 [latitude] => -8.12044775643893 [longitud...
asked by 29.05.2014 / 20:22