Array_combine() for PHP4


/ Published in: PHP
Save to your folder(s)

Fallback Function for versions earlier then php5


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.