What is the fastest way to convert a simple array to an associative array in PHP so that values can be checked in the isset($array[$value])
?
I.e. fastest way to do the following conversion:
$array = array(1, 2, 3, 4, 5);
$assoc = array();
foreach ($array as $i => $value) {
$assoc[$value] = 1;
}