contents[$cartid] = $value; } #-----Àå¹Ù±¸´Ï¿¡ »óǰÀ» »èÁ¦ÇÏ´Â ·çƾÀÔ´Ï´Ù-----# function deletes( $cartid ) { if ( count($this->contents) > 0 ) { while ( list( $key, $value ) = each($this->contents) ) { if ( $key != $cartid ) $new_cart[$key] = $value; } $this->contents = $new_cart; } } #-----Àå¹Ù±¸´Ï¿¡ ÀÖ´Â ¸ðµç »óǰÀ» ¾ò¾î¿À´Â ·çƾÀÔ´Ï´Ù-----# function get_list() { return $this->contents; } #-----Àå¹Ù±¸´Ï¿¡ ÀÖ´Â »óǰÀÇ °³¼ö¸¦ ¾ò¾î¿É´Ï´Ù-----# function get_count() { return count( $this->contents ); } } ?>