Questions tagged as 'foreach'

0
answers

Passing parameter inside method in foreach

I have the index that contains my call of class CRUD and foreach calling the method of class crud . But within foreach I'm trying to pass the table name parameter, but it does not show anything. If I take the parameter...
asked by 22.11.2016 / 15:25
1
answer

PHP Read TXT, delete lines, create new file

I want to use PHP and xamp / wamp to do the following task on my computer without the need to upload / download: I have dozens of TXT files on the computer, each TXT containing only 1 name per line, no dashes, periods,., etc. I want to do...
asked by 30.11.2016 / 20:10
0
answers

data listing

It is only printing the first row of the database and I want it to print all the lines. <?php @session_start(); include_once $_SERVER['DOCUMENT_ROOT'] . '/PlanejamentoEstrategico/model/indoperacionais/Indoperacionais.php'; ?>...
asked by 22.08.2016 / 20:54
1
answer

C # foreach interrupted

When I try to move the controls from a FlowLayouPanel to another flpPropriedades -> flpReserva through a foreach loop it leaves the middle and does not complete the transition. foreach (Control control in flpPropriedade...
asked by 24.06.2016 / 11:00
0
answers

Insert an array with codeIgniter and ajax

Hello I'm trying to insert an array, but in this case, you can insert multiple lines in db. How do I pass the pro codeIgniter data: var productsData = []; $(".productRow").each(function(i){ var pData = {...
asked by 18.04.2016 / 01:50
0
answers

Foreach in checkbox for cookie

How do I make a Form with Foreach in 200 Checkbox and send the selected Checkbox results to a Cookie?     
asked by 29.04.2016 / 01:43
1
answer

Update table using PDO with 2 foreachs

Hello, public function update($idsimages, $dir_images) { try { $stmt = $this->db->prepare("UPDATE images SET dir_images = :dir_images WHERE id_images = :id_images"); foreach ($idsimages as $idsimage) { foreach ($dir_i...
asked by 29.03.2016 / 21:41
0
answers

Error fetching array by index

I have this code and I do not know why it is returning only the first character of the variable (exe: if the login contains the Diego value, it only prints D) The print_r that is there, I put to test the return all the information I need is ther...
asked by 05.04.2016 / 21:43
1
answer

Print all images from another table without repeating the title

I have both tables below IMAGES table id_imagens | diretorio_imagem | post_id 1 imagem1.jpg 1 2 imagem2.jpg 1 3 imagem3.jpg 1 4 imagem4.jpg 1...
asked by 23.03.2016 / 00:48
0
answers

Retrieve FOR loop variable inside a FOREACH - php

Hi, I have two links in the structure of my code. The first is a FOR that mounts an array with data. And I have a foreach that traverses some DB data. I want to use the variable that returns in FOR and use in foreach, but it does not seem to...
asked by 16.12.2015 / 11:57