ID: 15268 Updated by: georg Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Arrays related Operating System: window NT PHP Version: 4.0.6 New Comment:
In your sample you removed 2nd dimensions from $e, not first, so $e[1] is an empty array. e.g. vardump($e): array(2) { [0]=> array(2) { [0]=> string(3) "aaa" [1]=> string(3) "bbb" } [1]=> array(0) { } } To remove first dimension use unset($e[1]) Regards Georg Previous Comments: ------------------------------------------------------------------------ [2002-01-29 00:33:14] [EMAIL PROTECTED] hello : i have a problem on remove 2 dimension array in which the count of array still is same as before the array was remove. example: $e[0][0] = "aaa"; $e[0][1] = "bbb"; $e[1][0] = "111"; $e[1][1] = "222"; count(array) is equal to 2, then i try to remove an element of that array using unset : unset($e[1][0]); unset($e[1][1]); then i try to retrieve the count of array again, the result should be 1, but what i get from it is the count of the array is still not change, which it : echo count($e); //result is 2 i have been try this for single dimension array, there is no such problem on it, just the 2 dimension array will face this kind of problem. thank you !! ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=15268&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]