Tag->push(array('Tag'=>array('name'=>'data structure'))); $this->Tag->push(array('Tag'=>array('name'=>'boredom'))); // prints 'boredom' tag pr($this->Tag->top()); // prints and delete 'boredom' tag pr($this->Tag->pop()); $this->Tag->push(array('Tag'=>array('name'=>'exciting'))); // prints and deletes 'exciting' tag pr($this->Tag->pop()); // prints 1 pr($this->Tag->length()); // finally empties out the stack, deleting and printing the 'data structure' tag pr($this->Tag->pop()); // prints 0 pr($this->Tag->length()); } ?>