item[$name] = new Item; $this->item[$name]->name=$name; $this->item[$name]->code=$code; $this->item[$name]->count=$count; $this->item[$name]->price=$price; } function get($name) //ǰ¸ñ¸íÀ¸·Î ³»¿ë Àоî¿À±â { return $this->item[$name]; } function fetch() //ǰ¸ñ³»¿ëÀ» Çϳª¾¿ °¡Á®¿À±â { $temp=current($this->item); if (!$temp) reset($this->item); else {next($this->item);} return $temp; } function remove($name) //ǰ¸ñÀ» »èÁ¦Çϱâ { unset($this->item[$name]); } } ?>