Questions tagged as 'foreach'

0
answers

how to put a foreach inside a while

$query4 = $mysqli -> query ("SELECT s.e_mail FROM staff_courses as sc join staff as s on(s.id_staff = sc.id_staff) WHERE sc...
asked by 13.09.2018 / 01:15
1
answer

Loop to database insertion

I want to upload each one of the: Titles, Lists and descriptions Knowing that: $ title is executed 40 times with different titles $ list is executed 40 times with different list $ description is executed 40 times with different description I can...
asked by 18.07.2018 / 03:00
2
answers

Problem with foreach powershell

I have a small problem with a powershell script ... I'm learning how to program and I do not know how to solve it. $descargas = "C:/Maqueta" if(Test-Path -Path $descargas -PathType Container){ Write-Host "El directorio $descargas ya esxis...
asked by 19.06.2018 / 09:34
0
answers

Paint table with data stored in the database

When you paint the table and fill it, it shows the data of the last line that was saved, but in the database if the correct values of the previous values are saved but in the load it only shows the last one. $sql = mysqli_query($con, "se...
asked by 18.06.2018 / 18:10
0
answers

Invalid argument supplied for foreach () ... Error

I have the following problem on my website, when I check the file "error_log" this em shows the following error: "Invalid argument supplied for foreach () in / home / ..." This is in the error location: <?php...
asked by 09.06.2018 / 22:50
0
answers

Change PHP7 Each gives me warning

Hello, I have inherited a web in php, when I change to PHP7, I get it: Warning: Variable passed to each() is not an array or object I want to paint a table with the schedules for each day of the week. When it has data, the past value paints...
asked by 08.06.2018 / 14:03
1
answer

How can I build an HTML Table with the content of Arrays?

Hi, I'm trying to make a function () php in which to enter an array and output a variable that contains an HTML table with the content of the Arrays [ARRAY] Array ( [0] => Array ( [tipo] => Ahorros...
asked by 25.05.2018 / 06:02
0
answers

Browse child elements of DOM HTML with foreach using PHP Simple DOM

The problem I have is the following: I'm doing a metacritic parser that collects data from the search pages to add them to a database and then it shows it in an autocomplete of a search box on my website. The parser passes the content to a...
asked by 09.05.2018 / 12:14
0
answers

Add a number of days or another if a condition is met or not

I try to add a number of days or another depending on whether the field Date_Pending is established. If it is, 30 days are added to that date. If it is not, add 15 days to the Opening_date. I can not get it to work, I think the problem is...
asked by 26.02.2018 / 22:00
0
answers

Error trying to display data from 2 tables using php and mysql

I'm having an error trying to show data from two tables. Error: Warning: Invalid argument supplied for foreach () in C: \ xampp \ htdocs \ Frank \ principal.php on line 45 <?php $consulta= "SELECT CONCAT(nombre,' ',a...
asked by 01.02.2018 / 02:31