public static function setdefaults(&$arr, $defaults) {
    foreach($defaults as $key => $value) {
      self::setdefault($arr, $key, $value);
    }
  }
public static function setdefaults(&$arr, $defaults) {
    foreach($defaults as $key => $value) {
      self::setdefault($arr, $key, $value);
    }
  }
public static function setdefaults ( & $ arr , $ defaults ) { foreach ( $ defaults as $ key => $ value ) { self :: setdefault ( $ arr , $ key , $ value ) ; } }
Sets default values for keys in the given array.

@param &assoc $arr the object to update.
@param assoc $defaults the default keys and values.
Sets default values for keys in the given array .