Questions tagged as 'foreach'

1
answer

filling list with foreach c sharp and .net

I have the following code in which I add items to a list by foreach this is my code: var archivosguardados = new List<Archivos>(); foreach (var a in modelArchivo) { FactoryClass.ArchivoModelToAr...
asked by 19.04.2018 / 23:36
1
answer

Warning: invalid argument supplied for foreach () in - PHP

Why the following errors? Notice: Undefined index: images in C: \ xampp \ htdocs \ daw \ Classes \ Cabanas.php on line 24    Warning: Invalid argument supplied for foreach () in C: \ xampp \ htdocs \ daw \ modify.php on line 39 Test Cod...
asked by 05.12.2017 / 12:25
0
answers

problem with foreach in mvc 4 asp .net c #

my problem is based on a table RESTRICTIONS, which is based on a turn-taking system, these restrictions can be created by the admin from its backoffice, so to go through this table I use a foreach, and for example I rely on The common restrictio...
asked by 23.10.2018 / 04:11
0
answers

I have a table that I got with web scraping I would like to modify it and give it my own design

I have a table that I got with web scraping I would like to modify it and give it my own design <?php $codigo = ($_GET['codigo']); $codigo2 = (string) $codigo; $link = "http://www2.deltron.com.pe/modulos/productos/items/postsql.php?item...
asked by 19.10.2018 / 19:27
2
answers

Limit foreach query

How can I limit an @foreach? I use a foreach to show the data of a related table and I would like to limit the results of that foreach I try to use this but it gives me error {{$count = 0;}} @foreach($product->post as $produc) {{if($count...
asked by 07.10.2018 / 22:18
0
answers

Avoid repeating the value entered in all table inputs built with foreach loop

Good day to all first of all a greeting to all The situation is as follows: 1.- I load several check points of a checklist in the "Review points" model. 2.-Next I build a table creating a "form" for each created row that contains a chec...
asked by 04.10.2018 / 19:18
0
answers

cycle foreach duplicates the inserts to the database

I have a JSON that I sent from an android app to a PHP file where I go through it and store it in the PosgreSQL database, the situation is that when there are more than 250 records it always duplicates them ej json takes 300 elements and enters...
asked by 19.09.2018 / 18:56
0
answers

I have a problem in multi-level menu creation

I'm creating a multi-level menu in php is pretty good but the problem arises when loading the sub-levels <?php $items = array( array( 'idcategoria' => 1, 'nombre' => 'Pinturas', 'padre_id' => "0" ),...
asked by 09.09.2018 / 22:49
0
answers

How good is it to parallelize twice using foreach in R?

I am programming a code that calculates some parameters in a series of time of which I must generate 200 functions of each, on which I calculate the parameters with a function that I built. My code is as follows library(foreach) library(doPara...
asked by 19.08.2018 / 22:13
0
answers

Mpdf. Foreach does not work, to generate a pdf of a select

I have this code, it works for a record. then I need to do it automatically according to a select response and I put it inside a foreach, now it generates the first pdf, and then it does not get more pdfs. What can I check? This is a php 5.3 and...
asked by 10.08.2018 / 15:02