Questions tagged as 'array-associativo'

1
answer

Transform object into array while maintaining index

Good evening Friends who can help me? I have this Array of objects, I needed to make this Object in list more while keeping the index as it is UsingMapitchangestheindex: I then needed to access each item to perform calculations, but the...
asked by 04.07.2018 / 20:40
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
1
answer

Relation between Python Arrays

I'm a beginner in Python and I'm having a hard time doing the following: I have 1 vector with the following values: position = [34.53, 32.64, 44.20, 43.41] These values are given by the Euclidean distance of the following coordinates:...
asked by 05.08.2017 / 03:50
1
answer

Compare values of two arrays

Hello, I need to compare 2 values of 2 arrays, but I'm not if getting: plan = [{'Cod': '11518', 'qtdPallet': '176', 'qtdLastro': '22', 'qtdCx': '12', 'Prod': 'Exemplo1', 'FC': '1'}, {'Cod': '972', 'qtdPallet': '72', 'qtdLastro': '9', 'qtdCx':...
asked by 16.06.2016 / 15:29
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
0
answers

how can I create and model a table with attributes in the database with the PDO using array?

I have already got this method following some examples that I saw there but I still do not understand very well how I'm going to go through this array and make the table attributes public static function Colluns($database,$tables) { #'id_pes...
asked by 18.08.2017 / 18:14
1
answer

Help with login system [duplicate]

I'm setting up a login system. But I can not validate the password you entered. When I try in this way it accuses the wrong login / password. But I already made sure, the login and password are correct: <?php require_once 'init.php';...
asked by 09.01.2017 / 20:57
0
answers

How to create a filter for a mixed multidimensional array

I have in my POST complex variables with arrays inside other arrays and so on. See: $filtro['esms_conta_id'] = 120; $filtro['data_inicio'] = 2016-010-1; $filtro['data_final'] = 2016-010-1; $filtro['status']['accepted'] = true; $filtro['status'...
asked by 01.08.2016 / 20:15
2
answers

Problems with Jquery selectors

My problem is this, I have this code: <script language="javascript"> $(document).ready(function(){ $('#simular').each(function(){ $(this).click(function(){ $("input[name...
asked by 13.04.2016 / 03:57
1
answer

Treat a POST array from a table

Good evening, my dear ones. I'm having a hard time dealing with some data. I created a table, where <td> are fed dynamically when passing through a foreach like this: <table class="table table-striped table-bordered" id="tb-...
asked by 03.11.2018 / 00:29