I have a table that store the relational between two other table that look like this
id_post | id_formation
______________________
1 | 1
1 | 3
3 | 2
3 | 4
I want to select and store this result to array of array:
example (in this case):
array(
1=>array(1,3),
3=>array(2,4)
)
Could anyone tell me the SQL statement to do this? or PHP code to format the result like above ?
This creates the array you want: