Simple array question
Posted: Mon Jan 26, 2004 1:14 pm
Hi all,
I was wondering if there's an easy way to empty an array. I've got an array already full of values, and I want to remove all index/value associations so the array becomes empty. Due to the type flexibility in PHP, I've managed to do a workaround by just setting the array to = ''. I know it's extremely ugly, but that's why I'm posing the question here. Thanks in advance for any help/suggestions.
I was wondering if there's an easy way to empty an array. I've got an array already full of values, and I want to remove all index/value associations so the array becomes empty. Due to the type flexibility in PHP, I've managed to do a workaround by just setting the array to = ''. I know it's extremely ugly, but that's why I'm posing the question here. Thanks in advance for any help/suggestions.