Questions tagged as 'array-multidimensional'

1
answer

Dynamic array as a parameter in C or C ++?

After hours of research, I did not find anything that answered my question, or I could not understand the answer. I want to create a NxN array of variable size. I did with pointers , but I want to pass it as a parameter between functions, a fu...
asked by 25.03.2018 / 06:51
1
answer

Define associative array key

Consider this array: protected $filter = [ 'preco' => 'required;double(1,4)', 'email' => 'required;email' ]; Step by foreach: protected function bootFilterPost() { foreach ($this->filter as $key => $value):...
asked by 05.10.2017 / 12:37
2
answers

Fill in missing numbers in a sequence

Hello, I'm building a statistics system. The result is an Array with "time" and "views". I need to increment this data 24 hours a day for the chart to be complete. $sql = "SELECT HOUR(data) as hora, COUNT(id) as views " . "...
asked by 22.07.2017 / 05:50
1
answer

How to add an array inside an array array?

$regras = array( array( 'field' => 'cpf', 'label' => 'CPF', 'rules' => 'required' ), array( 'field' => 'senha', 'label' => 'SENHA', 'rules' => 'required|trim' )); // o...
asked by 17.12.2016 / 13:56
1
answer

Send data type array in Webservice made in NuSOAP

Talk galley, blaze? I'm developing a webservice php in soap, I'm using the nuSOAP library, the simple type tests were successful but now I need to test with complex types like bad arrays I can not make work, the error in the transmission, alre...
asked by 01.07.2016 / 16:59
2
answers

Extract a new array from an array - Ruby

I have the following output: => [ [ 0] [ [0] "CELULA", [1] "LENNA ", [4] "jul 01", [5] " 2015 12:00:00 AM", [6] "N", ], [...
asked by 22.01.2016 / 02:17
1
answer

How to do 'Loop' in multidimensional 'Array' in Bash?

Situation: I need to create a multidimensional array script. Example: Table 1 > > Fields id and name Table 2 > > id and phone fields Current script: #!/bin/bash declare -A arr arr[tabela1]=id arr[tabela...
asked by 08.09.2015 / 16:26
1
answer

Resize Multidimensional / Associative Array from a ResultSet

I'm trying to feed a multidimensional and associative array from a ResultSet, however it accuses the following error: Microsoft VBScript compilation error '800a0401' Expected end of statement /beta/comercialBannersRelatorioGerado.asp, line 5...
asked by 12.11.2014 / 18:09
2
answers

How do I make the return of a query (PDO) already bring me an array ready?

I that I have: Periodo | Cliente _________________________ jan2014 | Cliente A jan2014 | Cliente B I want what: array( 'jan2014' => array( 0 => 'Cliente A', 1 => 'Cliente B', ) )     
asked by 10.03.2014 / 19:54
1
answer

Error listing MYSQL data via RESTful API with PHP (Ionic 3)

Good morning, I have a problem in listing data in ionic 3 using mysql. The problem is the following, I have an app that lists the comodo of a house and the consumption of each comodo, but I can not get the specific id of each room so that I can...
asked by 22.07.2018 / 17:00