Questions tagged as 'array'

2
answers

How can I separate a string by characters? PHP Jquery

Good afternoon Titans of programming, I have a problem, I'm taking from the database a string which gives me the following value 1101000100000000 , I explain what this value is for, each character is a state 0 = Cerrado and 1 = A...
asked by 07.06.2018 / 20:56
3
answers

How to consult an arrangement using one of its fields and display it in html [closed]

I have the following ARRAY var array = [ {"productoId":"4","categoriaId":null,"marcaId":"2"}, {"productoId":"87","categoriaId":null,"marcaId":"2"}, {"productoId":"175","categoriaId":null,"marcaId":"20"} ] This is received by a...
asked by 10.05.2017 / 17:03
1
answer

Pass select values by POST to CodeIgniter controller

You will see I want to obtain the value of the options chosen in the select , through POST , do I have to do a array with the values selected ?, I tried to do something but I did not get it View of the form <?php if(!emp...
asked by 12.01.2017 / 18:34
1
answer

traversing multidimensional associative array in PHP

I have a multidimensional associative array and I can not find the way to go through it, being each of the values accessible: $paises = ['espanya' => $espanya, 'usa' => "$", 'brasil' => "R$", 'canada' => "C$", 'colombia' => "COP...
asked by 13.04.2017 / 13:33
1
answer

Obtain capacity of an ArrayList

In an exercise I am asked to obtain the size and capacity of a previously filled Vector and ArrayList. In the case of the vector there are not many problems to do it, because it has a method. Vector<Object> planetas = new Vector<&g...
asked by 15.09.2016 / 10:16
3
answers

Alternative to .replace () so that it does not generate error in function with keys

I am creating a function that takes a nested array and returns it in a one-dimensional array, the problem is that I can not make it walk for cases in which keys {} are an element of the array, since the function .replace detect the laves, return...
asked by 21.08.2016 / 01:19
4
answers

How to compare elements of two JavaScript arrays?

I have a checkbox that allows me to filter items according to which are selected, but the system that I am was designed for a select of only 1 value, now I am adapting it to work with arrays instead of a number. Code let items = this.backup...
asked by 29.03.2017 / 22:34
1
answer

Sort Array of a file_get_html

I have this strange case, I hope you help me. I am trying to sort the result of an array Extracted with DOM but it does not work for me Code: include('../simple_html_dom.php'); $html = file_get_html('http://Google.com/'); $links =...
asked by 31.01.2016 / 14:31
2
answers

How can I save the numbers of a notebook in an array in java and then order those numbers [duplicated]

package vista; import core.core; /** * * @author geovanny9596 */ public class vista { public static void main(String[] args) { //leer un TXT core c = new core(); String s1 = c.leerTxt("C:\Users\geovanny9596\Do...
asked by 24.09.2018 / 05:06
2
answers

How to join two Arrangements? C ++

I am new to this, I am trying to unite the two arrangements to one, but it does not work out. #include <iostream> using namespace std; int main(int argc, char** argv) { int cantidad1, cantidad2; int valor1, valor2; int...
asked by 16.04.2018 / 04:37