Questions tagged as 'array'

4
answers

C # WPF How to separate a long string in multiple positions from an Array?

I need to create a getter and a setter for 14 Model properties that will be used to make Binding on xaml. Properties come from here: I have a field from a database table where it loads a very long string that contains information for 14 textboxe...
asked by 17.07.2017 / 18:17
2
answers

Add values from the same PHP array

It seems to be simple but I could not, I would like to add the following array (there are two arrays inside one, it is split with the array_chunk): $arr = [ [1, 2, 3, 4, 5], [6, 7, 8, 9, 0] ]; I would like the result to be this: A...
asked by 11.06.2018 / 18:20
1
answer

I want the result of a query and in SQL it is simple ... in PHP it is confusing

I just want the result of a SELECT in php and I do not know how to get the result: $descricao = mysqli_query($this->conexao, "Select descricao from tabela where codigo = 1"); var_dump ("$descricao"); Return a array and ho...
asked by 27.05.2018 / 22:02
1
answer

Sorting Array PHP [closed]

How can I solve the following problem: I have 4 arrays that are concatenated ( array_merge ) and have seen only one, but now I need to concatenate the vectors in a different way. I need to get index 1 from each array, then index 2, and so...
asked by 24.03.2017 / 15:17
1
answer

Pass vector as argument to a [closed]

I'm trying to pass a vector to a function in C, but I do not know what I'm doing wrong. As the code is small, I'll post the entire one: #include <stdio.h> int calcula(double A){ if(A<=10.0){ resposta = A; } re...
asked by 26.02.2018 / 19:06
2
answers

Parse error: syntax error, unexpected ',', expecting ']' in D: \ wamp64 \ www \ PROJECTS- \ sist-crop \ jcrop \ m2brimagem.class.php on line 40

How do I get this syntax error? $this->extensoes_validas = $extensoes_validas ['jpg','jpeg','jpe','gif','bmp','png']; What I wanted was to assign this array to $this->extensoes_validas     
asked by 16.09.2017 / 21:09
1
answer

Why does not the following code work?

The code should receive a number of student grades, print the grades average, and how many grades are 10% below and 10% above average. The code looks like this: quantidade = int(raw_input()) inicio = 0 ListaDeNotas = list() while quantidade &g...
asked by 10.04.2016 / 16:28
1
answer

How to extract index data from this array?

I'm developing a real estate site and I'll use the REST feature. The code below returns me one by one the properties registered in the server software as can be seen here > . $dados = array( 'fields' => array(...
asked by 24.11.2015 / 21:33
2
answers

pass php value to js giving error

<!DOCTYPE html> <html> <head> <style> table { width: 100%; border-collapse: collapse; } table, td, th { border: 1px solid black; padding: 5px; } th {text-align: left;} </style> </head> <body> <?php...
asked by 25.04.2015 / 03:47
1
answer

How to checkbox checkbox fields dynamically with PHP? [duplicate]

I'm sending neighborhoods through $ _GET through a form and would like to dynamically mark them in the screen update thus making a system persistence of the results sought. <fieldset class="normal"> <input type="checkbox" name...
asked by 05.11.2014 / 04:29