Questions tagged as 'array'

1
answer

How to fetch data in JSON in this particular code

I need to do exactly the same as requested in this post , get Json data and return in a specific field. User Jeffson Silva did exactly what I needed and made available on this Example . I just ran into the following problem: I can not fetch...
asked by 08.04.2016 / 18:21
1
answer

Array with Mysql

I'm trying to make a music draw but it always displays the last song registered in the database $sql = "SELECT nome FROM CadMusicas"; $result = mysql_query($sql, $conecta); while($consulta = mysql_fetch_array($result)) { $antigos= arra...
asked by 26.04.2016 / 18:57
1
answer

Update table using PDO with 2 foreachs

Hello, public function update($idsimages, $dir_images) { try { $stmt = $this->db->prepare("UPDATE images SET dir_images = :dir_images WHERE id_images = :id_images"); foreach ($idsimages as $idsimage) { foreach ($dir_i...
asked by 29.03.2016 / 21:41
3
answers

Array with no size limit

ClsPessoa[] Pessoa = new ClsPessoa[10]; I'm new to C # and would like some help. How can I declare an array of a class as in the example, without inserting a size limit.     
asked by 11.10.2015 / 20:48
1
answer

Recursion and sum

I'm doing a program in which you need a recursion according to the exercise that sums up a vector of two arrays and sums the lines after recursion and then adds the columns following my code #include <stdio.h> #include <conio.h> i...
asked by 18.03.2016 / 01:28
1
answer

Copy of Vectors

Good evening! I'm having a question about how to copy a vector. I declare a vector "matrix [a] [j]" and I need to take the arithmetic mean only of the values contained in "array [a]", so I need to make a copy only of the values "[a]" for an a...
asked by 13.04.2016 / 23:49
1
answer

How to add duplicate values from an array of objects and keep only 1 of each duplicate object?

Hello, I have the following problem and I'm having a hard time resolving it. I have a code that applies a mathematical formula. This formula ends up being applied several times. each time it generates an object the name and the result. The probl...
asked by 19.05.2016 / 18:20
0
answers

PHP: TXT for multi-level Array

Well, yesterday I had asked for help on the subject here that friends soon helped me, but I came up against another problem: Then I realized that the .TXT file has several levels, not just 2 as I had observed yesterday. I tried every way to...
asked by 11.03.2016 / 02:51
1
answer

How do I sum id values from an array in total

I get 2 results of an array, for example: 1 and 9, these numbers are ID's that I will use for a query in the bank and print these results on the screen, until I can print, but for example if it is found in bd 20 results with these ID's it prints...
asked by 11.03.2016 / 16:12
0
answers

Error fetching array by index

I have this code and I do not know why it is returning only the first character of the variable (exe: if the login contains the Diego value, it only prints D) The print_r that is there, I put to test the return all the information I need is ther...
asked by 05.04.2016 / 21:43