I'm new to php and mysql, I have a database with some fields already created, the idea is to print a ticket like the supermarkets but I want to list the purchased products one by one, so I read that you could use foreach, this it's the code that...
The following code corresponds to a For cycle that fills a calendar made with HTML (see the following image).
In this case, the events obtained by dates from the DB are shown. Those dates are doubled and try to fix it with an if but it ju...
I am trying to calculate the average time between the column created_at and updated_at, but I am having problems with the foreach, since it only takes the last value I send it, and ignores all the others.
public function tiempo()
{
$creaci...
Warning: Invalid argument supplied for foreach () in
C: \ xampp \ htdocs \ course_php \ pdo.php on line 9
My code is:
<?php
try {
$conexion = new PDO('mysql:host=localhost;dbname=curso', 'root', '');
echo "conexion exitos...
I have an error in the code I am doing, since it is duplicating the options of a list (agenda) that lasts for 15 minutes.
The form records everything very well and when I come with the foreach to disable the drop-off list the time that has al...
Hello very good I am doing a project and I have found this error:
Notice: Undefined index: registration in
D: \ xampp \ htdocs \ gdlwebcamp \ validate_register.php on line 25
Warning: Invalid argument supplied for foreach () in
...
Gentlemen, cordial greetings.
Searching, I found on the network a php script that allows me to search for files in a directory, I made an adjustment so that I search only pdf files and show me a link to download it, this works well, but I wou...
with help I have used the following code that allows me to enter data from an input and that it be separated into 3 different values that I need, which are value, code and serial
<?php
$datos = "3,5 1401 4145 7854 8454 7458 5152556555 5 140...
I have developed an algorithm in php to reorder an array that I have, the code is as follows:
<?php
$idescuelas=[4,5,8];
$newalumnos=[];
$sql="SELECT * FROM pruebas_alumno inner JOIN alumnos on pruebas_alumno.id_alumnos=alumno...