Posted By

razel on 02/06/08


Tagged

php array fallback


Versions (?)

Array_combine() for PHP4


 / Published in: PHP
 

Fallback Function for versions earlier then php5

  1. if (!function_exists('array_combine'))
  2. {
  3. function array_combine($arr1,$arr2) {
  4. $out = array();
  5. foreach ($arr1 as $key1 => $value1) {
  6. $out[$value1] = $arr2[$key1];
  7. }
  8. return $out;
  9. }
  10. }

Report this snippet  

You need to login to post a comment.