Questions tagged as 'array'

0
answers

Invalid argument supplied for foreach () ... Error

I have the following problem on my website, when I check the file "error_log" this em shows the following error: "Invalid argument supplied for foreach () in / home / ..." This is in the error location: <?php...
asked by 09.06.2018 / 22:50
1
answer

Doubt of passage of vector of structures to a function in C

I get the following error when wanting to pass the vector to a function:    [Error] could not convert '(teachers *) (& prfsr)' from 'professors *' to 'professors'. I pass the code to see what's wrong, I've been trying for a while to s...
asked by 10.06.2018 / 06:07
1
answer

How to group elements by months in vue

I have a set of data similar to this: [{fecha: '01/06/2018', pago: '30', id: '-LDviH9T9XripkL64-8y'}, {fecha: '02/06/2018', pago: '20', id: '-LDviH9T93spkL64-8y'}]. How could I group the elements by months and add the totals? For example:...
asked by 06.06.2018 / 00:07
0
answers

Problem with array returned by sql query

Good I have a problem I was comparing in my DB two tables with this code: SELECT nombre FROM ( SELECT nombre FROM control UNION ALL SELECT nombre FROM becados ) t GROUP BY nombre HAVING COUNT(*) > 1 But when you call it in php, you get i...
asked by 03.06.2018 / 05:07
1
answer

How to make random names

I want to make a random text in a text written by a php web, the theme is that the one I have created creates the same name in all texts, and I want it to be random, I do not know if I explain it. I have this: function generateRandomString($le...
asked by 03.06.2018 / 19:46
0
answers

How to save two-dimensional arrays in database?

Making a var_dump of my form I get this result: array (size=12) 'nombre' => string '' (length=0) 'apellido' => string '' (length=0) 'dni' => string '' (length=0) 'telefono_fijo' =...
asked by 02.06.2018 / 20:16
1
answer

Obtain entire division Days

I am currently from a form, obtaining the days from Monday to Sunday as follows: <td><dl class="dropdown"> <dt> <a href="#"> <span class="hida">Dias</span>...
asked by 30.05.2018 / 21:56
1
answer

How to show an array with several values stored in the same field

I have a field that stores a value of an array with several separate data with (,) in the same field of the database, as I do to show that data to show that information in a report. $sql = mysqli_query($con, "select * from document where...
asked by 07.06.2018 / 23:31
0
answers

Layout table from PHP array

I'm dealing with a table that is formed from an array and I do not give with the solution, I would greatly appreciate if you could horientar me. The problem is that I can not put in the same row and on the corresponding day the schools that have...
asked by 27.05.2018 / 12:57
1
answer

Save dynamic input in laravel

Good morning everyone I'm trying to save a dynamic input and a dynamic select but I can not do it This is my view of what I want to save I can save them like this $name = $request->title; $description =...
asked by 25.05.2018 / 21:36