I am trying to reset an array that I am storing items for a shopping cart in. I use a removeAll() function to accomplish this task. Here is removeAll():
// Remove all items from the basket
function removeAll() {
$this->items = array();
}
My problem is that if there are 11 or more items in the array, it will not reset. Works great on 10 or fewer, but 11 or more and the function freezes and I get no response.
Can anyone offer any help? Thanks!