PHP - How to create a nested array from mysql results, using each primary keys value as an array key
PHP - How to create a nested array from mysql results, using each primary keys value as an array key and reverse process