I have an array that looks something like this:
array(
0 => 'John',
1 => 'Smith',
3 => '123-456-7890'
4 => '[email protected]'
)
And I would like to programmatically change the keys so that the array becomes an associative array:
array(
'first' => 'John',
'last' => 'Smith',
'phone' => '123-456-7890'
'email' => '[email protected]'
)
What is the cleanest/most concise way of doing this?