Posted By


iloveitaly on 07/07/09

Tagged


Statistics


Viewed 458 times
Favorited by 0 user(s)

array_from_keys_values


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



Copy this code and paste it in your HTML
  1. function array_from_keys_values($keys, $values) {
  2. $ar = array();
  3.  
  4. $keys = array_values($keys);
  5. $values = array_values($values);
  6.  
  7. foreach($keys as $index => $key) {
  8. $value = $values[$index];
  9. $ar[$key] = $value;
  10. }
  11.  
  12. return $ar;
  13. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.