Questions tagged as 'array'

1
answer

How do I iterate with an array

How do I iterate with a array that I bring from the database in php and then send all those data obtained by a JSON to my view? This is what I have so far: $conn = new mysqli($host, $user, $pass, $db); $errores = array(); if...
asked by 25.08.2017 / 20:31
1
answer

How to insert multiple arrays using PDO from a PHP form?

Hi, I have a code that works to insert multiple records but only one array, I plan to add more inouts with different arrays but I can not find how to modify the part of the arrays. I imagine that in the case of the sql it would be something like...
asked by 29.08.2017 / 18:27
2
answers

Repeated Data in an Array

I have the following code: $lineas=""; $fechaAnt=""; for ($l=0; $l < count($dat); $l++) { if($dat[$l][0]!=$fechaAnt || $fechaAnt==""){ //Si tu fecha es diferente a la anterior o es igual a vacio porque es la primera vez $...
asked by 11.08.2017 / 18:01
1
answer

Two-dimensional array

I need to take the average of the grades presented in this exercise, the exercise told me to get grades by average and by subject but I really do not know how to make that average in php I have only managed to display the values <?php $cali...
asked by 15.08.2017 / 00:17
1
answer

How to pass a string of C # (aspx.cs) to a javascript fix for google maps?

I have a static variable in my webform class, which are coordinates for a Google map public static string Query = "19.475 -91.97500000 19.475 -91.98333333 19.4833333 -91.98333333 19.4833333 -92.01666666 19.5 -92.01666666 19.5 -92.025 19.533333...
asked by 18.07.2017 / 01:33
1
answer

Parsear 2 jsonArray in Ruby

I have this little problem in Ruby, I have an api with this response: response: [ { waspurchase: 1, purchase_data: { gateway: "plazavipgate", gateway_text: "TEXT_PGS_PAYMENT_ASD_ASD_ASD", gateway_data: { car...
asked by 17.07.2017 / 18:18
1
answer

Separate results by blocks

I have a query: SELECT * FROM items ORDER BY title ASC which brings me the results ordered in alphabetical order. now, separate with php, each block the results according to your initial letter Letter A Alibaba Andres Letter B...
asked by 05.07.2017 / 23:37
1
answer

Pass the value of a variable from one function to another function in Python

I am starting my studies in Python and I need to make this code for my class. Basically it consists in the registration of the workers of a company to calculate their salary / salary, applying some discounts and bonuses / incentives. In op...
asked by 08.07.2017 / 07:24
0
answers

C - Sometimes a function is not executed

I have a pseudo graph conformed by adjacency lists, where tree is an array of "lista_t" typedef struct nodo { int value; struct nodo *next; } nodo_t; typedef struct { nodo_t *primero; nodo_t *ultimo; int len; } lista_t; Well and...
asked by 06.07.2017 / 09:47
1
answer

Get Json string from $ _POST in Yii2

I try to make a query with $ .post from JQuery doing the following: function consultaAjax(url, val){ arreglo = { id: val }; datos = JSON.stringify(arreglo); $.post( url, datos, fun...
asked by 01.07.2017 / 00:27