Questions tagged as 'array'

1
answer

Problem adding the units, tens and hundreds of each element of the vector

I have a problem adding the units, tens and hundreds of a vector. Showing it in an example: vector [0] = 123 vector 1 = 456 vector [2] = 78 And that in units there are 17, in tens 14 and in hundreds 5. Adding in vertical line. for (int...
asked by 26.05.2018 / 04:07
1
answer

Smart cat game

I am a beginner in java and I am doing a cat game, I need you to have a method in which the machine plays at random and another in which it plays calculatedly, trying to beat the user. I have no idea how to start to make the machine actively try...
asked by 26.05.2018 / 03:41
2
answers

Separate PHP Array for BD insertion

I have the following code line: echo '<td><input type="checkbox" class="js-switch" name="permiso[]" data- color="#99d683" data-secondary-color="#f96262" data-size="small" value="'.$item.','.$id_user.'" /> </td>'; Where $...
asked by 24.05.2018 / 18:46
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

sql query sent with an array from jquery

I need to make an sql query with the results of an array so that it picks up some specific bbdd values var array_ch=JSON.stringify(ar); $.ajax({ url:'php/ch.php', type:'POST', data:{ch:array_ch},//aqui esta el array que...
asked by 16.05.2018 / 23:42
1
answer

Replace values in a JSON array

First of all thank you very much for helping me! :) I'm starting in the world of programming, and there's something I'm not able to solve / understand. I have a website in development that uses Template7, where I basically have an array in JSON...
asked by 16.05.2018 / 15:59
1
answer

How to compare 2 chains in java but that 2 words of them are free

Good day and thank you very much for your answers in advance. I have to make a java program that allows me to compare 2 strings (a predefined and correct one) and another that the user will enter, the theme is that in that, say phrase, 2 word...
asked by 22.05.2018 / 17:16
0
answers

Uncaught TypeError: Can not read property 'length' of undefined

Good morning, you will suddenly see this error, it marks me error in lenght, and although I try to save the length of my array in a variable, it does not work either, any suggestions? This is my code, the error is in the second for with newAr...
asked by 22.05.2018 / 17:27
1
answer

PHP capture bidimensional arrangement

I have been trying to solve a topic, but I have not found the answer ... This piece of code finishes generating an AxB matrix from data retrieved from a database. <?php for ($i=1;$i<=$cantidad_notas;$i++){...
asked by 15.05.2018 / 06:25
1
answer

Arrays in checkbox value php mysql

I have the following code: <thead> <tr> <th data-toggle="true"> Usuario </th> <?php $consulta="SELECT * FROM etapas_lab WHERE id_cliente = '$id_us'"; $ejecutar_consulta = $conexion->query($consu...
asked by 18.05.2018 / 20:27