Questions tagged as 'foreach'

0
answers

Angular 5 update with forEach correct only in the first items

I'm trying to run two functions, calculoDes() and desempenhos() , in Angle 5, but strange behavior occurs as a result. The first function calculates in some phases, always generating an object Array for the next step. The steps a...
asked by 09.12.2018 / 01:28
1
answer

Retrieve values from an array of the next line in the previous row

I have an array in the format below: Array ( [0] => Array ( [A] => 000001001000003001 [B] => VLR REF COMPENSACAO DE VENDA CONFORME CO1 [C] => 1.1.2.01.020001 [D] => Z4 [E] =>...
asked by 26.10.2018 / 18:40
0
answers

Error (Undefined offset: 1) of PHP and jquery

I have a problem with working with array in php what happens, I have the following code: function AddRows() { var campos_max = 10; var x = 0; $('#add-row-fixe').click(function (e) { e.preventDefault();...
asked by 25.09.2018 / 23:18
1
answer

PHP: Group data without using 'group_by'

Does anyone know how to group data without using group_by in the query? I need every 10 results to create a div , that is, 10 records within each div I do not care about values. <?php foreach($resultados->result() as $resultado)...
asked by 22.07.2018 / 03:50
1
answer

VBA Module that stores data from one cell and moves it to another cell and moves to the cell below

Good evening people, I created a folder with macro where I have two spreadsheets, Query and games. In the games spreadsheet I put game names and their respective values in real, already in the query I created a list to do the autocomplete with c...
asked by 08.08.2018 / 22:54
0
answers

How to get a data in a PHP cell

So, I need to get the cell value of the time in foreach, but since the vector was re-organized with asort () , I do not know how to get this value. If I put $ vector_Distance [0] , it would take the first cell (after it is organized), but cell...
asked by 23.06.2018 / 01:15
0
answers

Problem with iterating an array in php

I have the following code. $array = array(1,2,3); $arr1 = array(3, 4, 5); $data = []; for($i = 0; $i < count($array); $i++){ $data["ca"] = $array[$i]; for($k = 0; $k < count($arr1); $k++){ $data["ser"] = $arr1[$k];...
asked by 18.06.2018 / 21:14
1
answer

Laravel: Problem with foreach

public function extract(){ $occupation = Occupation::join('invoices', 'occupations.id', '=', 'invoices.occupation_id') ->leftJoin('payments', 'invoices.id', '=', 'payments.invoice_id') ->select('occupations.*',...
asked by 11.06.2018 / 21:34
2
answers

Help Foreach stdClass

Good morning: D I need a light! I need to get all the 'ids' of users from a table and move to another table, but when I give a foreach it returns only 1 result like stdClass. Follow the code: $stmt = $PDO->prepare("SELECT usuario_id F...
asked by 02.06.2018 / 16:15
1
answer

I want to use 2 threads inside the foreach C #

I do not have much experience in C #. But I'm trying to understand the code of a program I have here. Here use the following code: foreach(var item in _main.entrada) { .... } I want to include the _main.said (along with the entry) in the...
asked by 18.05.2018 / 01:23