array-multidimensional

Using array search in a php multidimensional array

In a list of books within a multidimensional array, each sub_array has a different column category , I would like to search ... ($livros, 'categoria'), 'Romance'); The above function does not bring no value, just an empty array, What am I doing wrong?

sort PHP multidimensional array

I have the following array returned from a webservice (in the image I identify what I Want, below the text to copy paste if n ... ed in red. I tried using https://stackoverflow.com/questions/2699086/sort-multi-dimensional-array-by-value but to no avail.

Summing values from an array

I'm trying to make this code, which is basically a 6x6 two-dimensional array with the distance between 6 cities, then collect ... r beauty, but when calculating the km, the for stops at 5. Give a help ai, I couldn't think of another way to calculate this.

I can't get an Array

I'm trying to grab a value inside an array, but it doesn't print anything from the id field, which is the field I want to gra ... high school to become a comedian-and that it was time to end the show. [origin_country] = > Array ([0] => US))))

Vector sorting of character vectors with qsort

The following program is not ordering the vector of chars vectors correctly, but I don't know why. Maybe it's my helper funct ... td_membros;j++){ cout<<equipe[i][j]<<'\n'; } cout<<'\n'; } return 0; }

How to make a foreach in JavaScript? [duplicate]

this question already has answers here : ... hin the campanhas array? Follows below the return array of an array: this.campanhas{campanha1{},campanha2{} ,campanha3{}}

Sort a multidimensional array with numeric values

Suppose the following situation in which I have a array consisting of several array with numeric values: $array = array( ... ows: $array = array( array(22), array(22, 23), array(22, 25, 28) ) What would be the algorithm for this case?

How to use ForEach in a multidimensional array in PHP

I would like to know how to run the whole array only with ForEach: $Marcas = array(array('Fiat', 'Volkswagen', 'Audi'),array('Yamaha', 'Suzuki', 'Honda'),array('Samsung', 'Motorola', 'Apple'));

Declare array in class not knowing it will be its size

How to declare an array within a class, even if you don't know what size it will be and leave it accessible by the entire pro ... : invalid use of non-static data member ‘grafo::tx’ int pgrafo[tx][ty]; ^~ }; How to solve this problem ?

Trying to program puzzle the change of elements in equivalent positions of two arrays of error

I'm trying to make a puzzle in which the image comes shuffled into pieces, and by clicking on two different pieces they chang ... da segurando = True if checaSolucao(solucao, matrizResDesenho): break ```

Function to multiply each row of a matrix by the value of its corresponding secondary diagonal

I am not being able to take the values of the secondary diagonal of an array by a function. /* 19) Elabore uma sub-rotina q ... same vector generated in that function and throw it in another function to do the calculations on top of the original array.

Working with array with X layers in JS

I am having a big problem, I have searched in several places and I did not find the solution I hope you can help me... My goa ... ut I can't finish it because of this damn doubt. Code I've already developed http://jsfiddle.net/mateusfmello/mja8ffs2/7 /