I have an array that look like this 

```
(
 0 => array( id     => '1',
             title  => 'some title',
             type   => 'fiction'
           )
 1 => array( id    => '2',
             title  => 'some title',
             type   => 'fiction'
           )
 2 => array( id     => '3',
             title  => 'some title',
             type   => 'Romance'
           )
)

```

I am trying to restructure it to be more like the following

```
(
 'fiction' => array( 0 => array( id     => '1',
                                 title  => 'some title',
                               )
                     1 => array( id     => '2',
                                 title  => 'some title'
                               ), 
 'Romance' => array( 0 => array( id     => '2',
                                 title  => 'some title'
                               )
)

```

I tried different function but cannot get it to work. 
Any help would be greatly appreciated. Thank you.