Questions tagged as 'foreach'

1
answer

Relate 3 tables in a dispensing of medicines?

I am making a system for my pharmacy: prescription drug dispensing. I made the table patients (id, name, cpf, phone, address, photo_document), dispensing (patient_id, medication_id, quantity, crm, date_receita, ) and medicines (id, medi...
asked by 05.07.2017 / 22:10
2
answers

Play date that returned from ajax in foreach php

I have a search ajax that retouches some data based on what was searched, how do I play that 'date' that comes from an ajax in a foreach in php ? $.ajax({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')...
asked by 19.06.2017 / 17:21
1
answer

JavaScript event if it is repeated in other IDs

I wanted to make a JavaScript if it repeated in other components of the screen, in this example I'm passing I made a foreach and inside it I put my javascript. the intention is that it repeat itself 10 times, but it only works once. Is there som...
asked by 21.11.2016 / 15:12
2
answers

Inner join not returning bank values

MY BANK CREATE TABLE EXPERIENCIA( exp_pri INT NOT NULL AUTO_INCREMENT, nome VARCHAR(150), email VARCHAR(50), exp VARCHAR(100), PRIMARY KEY(exp_pri) ); CREATE TABLE PRANCHA( prancha_pri INT NOT NULL AUTO_I...
asked by 14.06.2016 / 16:52
1
answer

Catch information from a foreach with another foreach

I have a mysql search that brings me the following array when using a foreach, I have another sql search that brings me all the fields of a table that in case they are the same field names that are below usr_tbl_ssid ... how do to display only t...
asked by 23.04.2016 / 12:10
1
answer

Use foreach in checkbox of a table

In the code I'm creating there is a display of all users of the site in an html table, so alright, but selecting multiple checkbox to exclude multiple users from the site simply nothing happens only the page updates but the data still continues...
asked by 02.01.2016 / 22:20
1
answer

Displaying vector with foreach - PHP

Would anyone have an example of a foreach to display the vector data below? Code: Array ( [empregadoTO] => Array ( [0] => EmpregadoTO Object ( [id:EmpregadoTO:private] => 1...
asked by 20.01.2015 / 22:50
1
answer

How to loop a PHP array

Hello, I have this array that is inside another array and I would like to read it, but I will never know how many keys the array items will have, since it can always be increased or decreased, but what I was trying to do was foreach ($dat...
asked by 19.12.2018 / 12:27
0
answers

Bug checking if there is a record if the button is disabled - LARAVEL

I'm having a bug it is not verifying correctly whether or not there is a related table record, it always comes from the current table and not from the other table DATA YOU SHOULD CHECK IF YOU EXIST IN THE RENEWAL TABLE (nomerespo, nomealuno)...
asked by 07.12.2018 / 19:42
0
answers

Add value in sequence to the end of the value of a php array

I would like to add values in sequence to the end of each value in my array. So that when the loop is executed add values to the end of my array. Example in pseudo code: // Array original $arr = ['1' => '1.','2'=>'2.']; FUNÇÃO QUE ADICIO...
asked by 23.12.2018 / 01:47