Empty array [SOLVED]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Empty array [SOLVED]

Post by aceconcepts »

Hi,

When all values have been deleted from my array and I print_r() my array it outputs as: Array ( [0] => Array ( [1] => Array ( ) ) [1] => Array ( [2] => Array ( ) ) )

How do I ensure that the array is completely empty?
Last edited by aceconcepts on Mon Apr 14, 2008 4:26 am, edited 2 times in total.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Delete values from array

Post by onion2k »

Search the array for the value to find it's key, then do what you're doing there with the key you found.
Post Reply