right now im doing something like:
foreach ($thing as $item)
{
$a = $item->this;
$b = $item->that;
$c = $item->him;
$d = $item->her;
$collection[] = array('this'=>$a,'that'=>$b,'him'=>$c,'her'=>$d)
}
what i want todo is inject the values into the array at the assignment like:
foreach ($thing as $item)
{
$collection['this'] = $item->this;
$collection['that'] = $item->that;
$collection['him'] = $item->him;
$collection['her'] = $item->her;
}
just that its not coming out the same... ive done this before I just cant for the life of me remember how i did it