I have the following array:
Array ( [0] => Array ( [ContractorName] => Joe Soap [BonusAmount] => 73.92 ) [1] => Array ( [ContractorName] => Mike Michaels [BonusAmount] => 68.55 ) [2] => Array ( [ContractorName] => John Smith [BonusAmount] => 34.35 ) [3] => Array ( [ContractorName] => Pete Peterson [BonusAmount] => 24.61 ) [4] => Array ( [ContractorName] => Pete Smith [BonusAmount] => 22.76 ) ) How do I go about ending up with an array that looks like this:
Array ( [Joe Soap] => 73.92 [Mike Michaels] => 68.55 [John Smith] => 34.35 [Pete Peterson] => 24.61 [Pete Smith] => 22.76 ) I'm a bit lost at the moment. I have tried creating a new array by looping over the first array, but I'm getting unwanted results. Any help greatly appreciated.