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