I have an array that looks like
$numbers = array(\'first\', \'second\', \'third\');
I want to have a function that will take this array as
This should do it.
function toAssoc($array) { $new_array = array(); foreach($array as $value) { $new_array[$value] = $value; } return $new_array; }