keys = array(); if (is_array($arr)) $this->keys = $arr; //var_dump($this->keys); } function get($key) { return $this->keys[$key]; } function add($key, $value = NULL) { $this->keys[$key] = $value; } function get_copy() { return new URL($this->keys); } function add_url($url) { $this->keys = $this->keys + $url->keys; } function render() { if (empty($this->keys)) return '#'; $arr = array(); foreach ($this->keys as $key => $value) { $arr[] = "$key=$value"; } $str = '?'.implode('&', $arr); //var_dump($str); return $str; } } ?>