I have a question, because I can't figure it out and I can't find it anywhere (maybe the wrong search-words I don't know..). I have the following:
Array ( [0] => Array ( [Factuurnummer] => 50 [Omschrijving] => Thing 1 ) [1] => Array ( [Factuurnummer] => 50 [Omschrijving] => Thing 2 ) [2] => Array ( [Factuurnummer] => 51 [Omschrijving] => Thing 2 ) [3] => Array ( [Factuurnummer] => 51 [Omschrijving] => Thing 3 ) [4] => Array ( [Factuurnummer] => 51 [Omschrijving] => Thing 4 ) )
Now when I use a foreach to print it all in a table I get 5 rows, but I only want 2, based on the same 'Factuurnummer'. So 1 row with 'Factuurnummer'=50 and 'Omschrijving'=Thing 1, Thing 2 and another row with 'Factuurnummer'=51 and 'Omschrijving'=Thing 2, Thing 3, Thing 4.
I've read something about array_intersect, but I don't know if that will help in this case. The nicest would be if the value from 'Omschrijving' based on same 'Factuurnummer' would be separated with a comma (like my little example).
Hope I was clear enough and someone could help me in the right direction!