Questions tagged as 'array'

2
answers

Get the name of the files sent by the form

I'm trying to get the name of the files after submitting the form: add_action('gform_after_submission_5', function ($entry, $form) { $file_url = $entry['5']; $filename = basename($file_url); }, 10, 2); When giving a var_dump $...
asked by 25.04.2016 / 21:29
1
answer

Two-dimensional array size within the struct in C

Hello. I'm doing a job that I read a txt (the file name is passed by argv []) and it generates a graph. In the first line of the file two parameters are passed as follows: GO These parameters are integers and have a meaning: V = number of vertic...
asked by 20.03.2016 / 17:29
1
answer

Print data from an array of PHP objects

I hit a bit with bank return using POO and MVC, and in case I'm bringing bank data where the date is equal to the current date, the problem is that I created an array of objects to store this return, and I have to display the data on another pag...
asked by 23.04.2016 / 05:37
1
answer

Create a new array with information from an Array sends via POST

I can not make a batch change of the information displayed through While . What I want to do is to create a new Array with the information I am sending via POST , that is, I send the information via POST , which creat...
asked by 18.04.2016 / 20:06
1
answer

Problems in an array of strings in a structure

I'm having a problem about an array of strings that I'm trying to access from a structure. The structure is set to header.h which has the following format: typedef struct { char *produtos[200000]; int contador; } Produtos,*ProdutosP;...
asked by 12.03.2016 / 17:02
1
answer

Go through the value of an array of a php function [closed]

I have this function, I would like to go through the values of it separately but I have here and I'm not able to reason right to do a foreach for example. <?php function numeros_pequenos($zero, $um, $dois) { return array ($zero, $u...
asked by 10.05.2016 / 21:38
1
answer

How to get data from an array and use rand without repeating?

I'm doing a quiz, and I saved the answers in an array, I want those answers to appear randomly that does not repeat in the quiz. I used the following code. <?php $times = array('', 'Corinthians', 'Santos', 'Flamengo'); for ($i = 0; $i &l...
asked by 02.04.2016 / 13:50
2
answers

How to check duplicate elements in array?

I need to know if an array in JavaScript has duplicate elements. Is there any function in the jQuery API that does this? If not, how can I proceed?     
asked by 17.03.2016 / 17:40
1
answer

Sort multiple object arrays by value

People have the following situation: var input1 = {preco:valor1.toFixed(3), tipo:name1}; var input2 = {preco:valor2.toFixed(3), tipo:name2}; var input3 = {preco:valor3.toFixed(3), tipo:name3}; var input4 = {preco:valor4.toFixed(3), tipo:name4}...
asked by 02.03.2016 / 15:57
1
answer

Get the name of an item inside an array in strings.xml

I have the following array: <array name="Codes"> <item name="Vermelho">e74c3c</item> <item name="Azul">3498db</item> <item name="Rosa">FC14E5</item> <item name="Roxo"...
asked by 01.03.2016 / 23:13