Questions tagged as 'array'

1
answer

Problem to split variables in PHP

I'm having trouble with a page in php. Whenever I put the following code to split two variables stored in arrays $dj_cv_at[percentual][$i] = ($dj_cv_at[concluida_c_imp_total][$i] / $dj_cv_at[concluida_total][$i]) * 100; As a result, the pag...
asked by 07.08.2018 / 20:56
0
answers

Mount tree of objects

I need to mount a tree of php objects, where I have for example: id | parent_id | nome | telefone | email from the last id I search and mount the whole tree of that idPai (int) 0 => object(App\Model\Entity\User) { 'id' =&g...
asked by 03.08.2018 / 14:02
1
answer

Array inside Array

Good evening, I'm consuming a webservice and I get the data in json with cURL. I have the data stored in the variable $ data. What I need is the following: Let's suppose that in the $ data variable you have the following data: $data = [...
asked by 01.08.2018 / 04:28
1
answer

Take the fields from a Select and pass to viewmodel

I have two Selects Multiple where their function is to change values as in the image below: ThefirstoneintherealisaDropDownListwherehelooksforthebankinformation,followshiscode:@Html.DropDownList("Avaible", ViewBag.Account as SelectList, n...
asked by 13.07.2018 / 15:30
0
answers

Problem with array_search

I have array below that is giving a problem. When I give a search he only seeks some values he is not finding the 2018-06-11, 2018-06-18 and the 2018-06-26 The rest works perfectly $hoje = "2018-06-11"; $diario = array( "0.25...
asked by 03.07.2018 / 15:46
0
answers

(c) Sort Matrix of Structs

Good to all! I have a problem that I can not solve and I seek help from members. In my code, I read the contents of a file and save it in a string for use in the code, in the main loop, I get this string and refer to the function call BreakSt...
asked by 01.07.2018 / 18:43
1
answer

Return data in JSON into an array, replacing the database ID with their names. How can I do this?

I made this code, but it only returns me the ids, and I would like instead of the ids it does a search for the inner join in the database and returns in place of the ids the names. Code php: <?php header('Content-Type: application/json')...
asked by 26.05.2018 / 13:37
0
answers

Function integration returns error "only length-1 arrays can be converted to Python scalars"

I'm trying to integrate a function into a given range that shows the flow of particles in a zero-angle (theta) direction as a function of the energy E of the particles. I've tried several ways and got different errors but this is what always per...
asked by 17.05.2018 / 02:38
0
answers

Sockets Array in C

I'm studying in C and I'm creating a program that exchanges messages between pc's in the client / server style. I created an array of sockets and put them in threads. int main () { pthread_t *servidor = malloc(sizeof(int*)*2); pthre...
asked by 24.06.2018 / 23:22
0
answers

Array with random indices

I have a random array that returns several keys and I need to manipulate all the returned data, the problem is that they vary according to the occasion, I want to display this information organized in HTML, but there are cases where this array r...
asked by 10.05.2018 / 03:12