Questions tagged as 'array'

2
answers

Get duplicate vector values

I would like to get only the values that are duplicated in the array I'm trying to do this: $cdCursos = array(1, 2,3,4,5,3 ); echo "<pre>"; print_r( $cdCursos ); echo "</pre>"; $withoutDup = array_unique($cdCursos);...
asked by 10.08.2018 / 15:29
3
answers

More or less a Select in array

Good evening, I have two Arrays: $array1 = ( [0] => Array ("Nome":"Rodrigo","CPF":"123456789-00","Cargo":"Abestado") [1] => Array ("Nome":"Maria","CPF":"987654321-00","Cargo":"Abestada") $array2 = ( [0] => Array ("CPF":"123456789...
asked by 02.08.2018 / 04:48
2
answers

Concatenating the elements of an array

I have an array in Javascript: var array_soma = [ "parte 1", "parte 2", "parte 3", "parte 4", ]; I would like to concatenate each element into the...
asked by 07.07.2018 / 02:14
2
answers

Array list in multidimensional array

I have this loop: aaff = [];contador_selecionados=0; $(' .values .layout .acf-input').children('').each(function(index,element){ contador_selecionados++; aaff.push( element.value); console.log(contador_selecionados); }); console.log(aaff);...
asked by 15.10.2018 / 19:25
2
answers

Know if value is in array without equality comparison!

I have the following code in C ++: #include <iostream> using namespace std; int main (void){ int e[5] = {10,20,30,40,50}; for (int i = 0; i <= 99; i++){ if ( i in e ) cout <<...
asked by 17.10.2018 / 13:58
1
answer

Highest value in a fixed vector of 10 positions

I am with pending exercise to find the largest element in a fixed vector of 10 elements. But when I declare the integer of the vector works, but when I ask the user to enter the values it does not work. int i, v[10]; int maior = v[0]; for(i =...
asked by 21.10.2018 / 22:06
2
answers

Insert array into a database using PHP

In the site I'm creating I have a form where people can add multiple topics. My problem is when a second or more topics are created because only the first one goes to the bank and I can not get the others inserted. The code I'm doing is this...
asked by 09.06.2018 / 20:48
3
answers

Get a value of multiple arrays within an array

I have a question regarding an array, I have an array that keeps several arrays inside, this is the result: Array ( [0] => Array ( [membro_id] => 1465 [membro_nome] => Gustavo Silva de Oliveira [membro_est...
asked by 18.07.2018 / 21:15
1
answer

How to get a value inside an array with PP

I have an API with some information and I want to get the genre: Samba / Pagode stdClass Object ( [id] => 46484422 [title] => Raça Negra e Amigos II (Ao Vivo) [upc] => 7891430177379 [link] => https://www.deezer.co...
asked by 17.06.2018 / 23:49
1
answer

How to read and sort this json PHP?

{ "groups": { "superadmin": true, "admin": true, "user": true, "Hitman": true }, "customization": { "1": [0, 0, 2], "2": [0, 0, 0], "3": [17, 0, 2], "4": [98, 1, 2], "5": [51, 0, 2], "6": [51, 0, 2], "7...
asked by 03.04.2018 / 19:04