title: PHP - Merge two arrays (same-length) into one associative?
body: <p>pretty straightforward question actually..</p>
  
  <blockquote>
    <p><strong>is it possible in PHP to combine two separate arrays of the same length to one associative array where the values of the first array are used as keys in the associative array?</strong></p>
  </blockquote>
  
  <p>I could ofcourse do this, but I'm looking for another (built-in) function, or more efficient solution..?</p>
  
  <pre><code>function Combine($array1, $array2) {
      if(count($array1) == count($array2)) {
          $assArray = array();
          for($i=0;$i&lt;count($array1);$i++) {
              $assArray[$array1[$i]] = $array2[$i];
          }
          return $assArray;
      }
  }
  </code></pre>