I have two arrays, e.g

```
$mainArray = array('a','b','c','d','e','f','g');

```

$subArray = it contains an array of objects e.g

```
array( objec1, objec2, object3, object4) ...

```

within each of the objects, holds the value that matches one of the keys in the 
$mainArray.

my Question now is, how am i gonna match and put the correct objects to the mainArray, so that
it should appear like this e.g

```
$mainArray = array('a'=> array(object3,object2), 'b' => array(object4,object1));

```