Questions tagged as 'array'

1
answer

FPDF with MySQL and PHP - Bringing repeated data

I'm trying to set up a generator system of Vouchers/Tickets I have a table in SQL with the name Vouchers with multiple users and their respective passwords. I call each cell the variable $serial_voucher and $senha_vou...
asked by 11.11.2017 / 23:14
2
answers

check if value exists in the array, if there is no write data that does not exist in another array

$array = array( 'b_E_'.$cnpjClie.'_'.date('Ymd').'_A.'.$ext, 'b_M_'.$cnpjClie.'_'.date('Ymd').'_A.'.$ext, 'b_M_'.$cnpjClie.'_'.date('Ymd').'_B.'.$ext, 'b_M_'.$cnpjClie.'_'.date('Ymd').'_C.'.$ex...
asked by 30.10.2017 / 17:00
1
answer

PHP $ _POST is not being created when you send the form

I have a form whose method is POST: <form action="/includes/process.php" method="post"> <input type="hidden" name="breakDown" value="1" /> <input type="hidden" name="string" value="2" /> <a href="javasc...
asked by 31.10.2017 / 18:48
2
answers

Array of struct accepting more than defined, what's wrong?

In the code I created an array of type Pessoa containing only 2, but when it begins to iterate in the for loop and accesses index 2 and 3 the string continues without generating compile-time error nor execution. Is this behavior normal?...
asked by 10.11.2017 / 02:01
1
answer

Add value of childrens nodes to parents value in array recursively

Good afternoon. I have the following array structure below, how to sum the values of node_value of child nodes to node_value values of parents , recursively? Array ( [0] => Array ( [node_id] =>...
asked by 22.10.2017 / 17:31
0
answers

Check if the word exists in the string using array of strings and separate the string in a new array

I'm in a problem where I want a string to become an array with the words separated, but the code returns duplicate arrays var string = 'xicara,cafecafe'; var array1 = ['casa', 'xicara', 'xicarada', 'xicrinha', 'xi', 'carro', 'cafe', ',...
asked by 19.10.2017 / 15:35
0
answers

Search and List via Json_decode

I have the following tables: Whendoingthebrandsearchthroughtheinputpost,Ineedtolistalltheproductsthatcontaintheidoftheselectedbrand.Belowismyexcerpt.$marca=$this->input->post('marca');$marca=explode(',',$marca);if(count($marca)>0){$i=0...
asked by 17.10.2017 / 13:31
1
answer

Number problem distinguished in java

package totoloto; import myinputs.*; public class Totoloto { /** * @param args the command line arguments */ public static void main(String[] args) { int aux, k = 0, l, i, j, u; int t = 0, s; int[] x = new int[6]; System.out.p...
asked by 17.10.2017 / 02:40
2
answers

How to read a string inside an array?

I would like to read a field of type varchar in a MySql database, which contains several dates in the following format: "20171012 20171102 20171115 20171120 20171225" all within an array of type, like this one below: Data[1]="20171012"...
asked by 16.10.2017 / 23:45
2
answers

Save sentence in TextView when closing the app

I have many sentences that will be displayed in a TextView, whereas I will click on the button and there will be new sentences, I would like to know if the phrase that is in index 0, when clicking it is to index 1, if I close the app and open ag...
asked by 16.10.2017 / 19:11