Questions tagged as 'array'

0
answers

Can not use string offset as an array

The following code works well in PHP but in PHP 7 it gives an error:    Can not use string offset as an array How can I solve the line with error in the following code? if (empty($node['courses'])) { return ''; } $result = '<...
asked by 05.07.2018 / 21:17
0
answers

Paint table with data stored in the database

When you paint the table and fill it, it shows the data of the last line that was saved, but in the database if the correct values of the previous values are saved but in the load it only shows the last one. $sql = mysqli_query($con, "se...
asked by 18.06.2018 / 18:10
0
answers

validate repeated in session

Best regards, I would like to please help me with the following: I have the following values in session, what I want is to add the amount when the codes are equal Array ( [0] => stdClass Object ( [Insumo] => TA...
asked by 25.06.2018 / 16:51
1
answer

Firebase database delete item array

I can not delete the items I have in an array with the following code, trying two ways but nothing happened to the image of the bbdd and the code. Maybe it's doing it with onDataChange ??? public void deleteEvent(View view) { database...
asked by 16.06.2018 / 17:52
0
answers

error when operating array with java

Hellos, ask if I had to open a new post for a new question I have about this code and inform me that if it is the same code, I can edit, tons, now I have a little problem under this part of the code // now we obtain the scalar multiplication dat...
asked by 16.06.2018 / 03:20
1
answer

Assign default value when destructing arrays

I would like to know how to put a default value for the constant b , I have to do an exercise 'deconstructing' arrays, but b is already assigned as constant and I do not know how to make it worth 2 without touching this line of code...
asked by 18.06.2018 / 14:57
0
answers

How to separate the data entered in a txt file by commas in c language?

int main() { struct datos { char nombre[21]; int edad; char ciudad[21]; }persona[10]; // Array de struct con datos para 10 personas. FILE *fichero; int i, numero=0; fichero = fopen("gente.txt", "wt...
asked by 24.06.2018 / 14:49
0
answers

Help with Ionic and Firebase * ngFor

What's wrong in my code, I want to do a ngFor of a variable where by means of a push the variable is added to be later observable by the asyn and wait function of addToArray () this.data = this.AuthService.getData() getData() { return ne...
asked by 11.06.2018 / 04:36
1
answer

Download array by adding items and grouping by month

I have an array like this: "Year:2017,Mes:8,Suma:0" "Year:2017,Mes:8,Suma:5" "Year:2017,Mes:8,Suma:5" "Year:2017,Mes:8,Suma:0" In what way can I group by month and year, add the data, so that I have another array like this? "2017-8", "10"...
asked by 10.06.2018 / 18:05
0
answers

Join data from two tables in javascript

What I manage to do is filter my first table from where I get the first data next to an "id" that I use to filter a second table, the issue is that I can not join them in a single array. An example would be something like this first filtered dat...
asked by 09.06.2018 / 20:28