1
How do I join several arrays in an array when they have the same fields?
I have this following array being returned, I would like to group them into a single array where they have the same value pro id_question, for example: in the first 3 array that has the id_question = 1, they enter an array only, getting, array = [ [array1], [array2], [array3] ]
Q.S.: All of these arrays are inside of another that is contained in the $return variable
the SQL is this: SELECT * FROM respostas INNER JOIN perguntas ON respostas.id_pergunta = perguntas.id_pergunta WHERE perguntas.id_questionario = $id_questionario