ID: 36274 Updated by: [EMAIL PROTECTED] Reported By: micheal dot winger at gmail dot com -Status: Open +Status: Bogus Bug Type: Feature/Change Request Operating System: Windows XP Home PHP Version: 5.1.2 New Comment:
Expected behaviour. And I really doubt it's going to change ever, since it would be an unreasonable BC break. Previous Comments: ------------------------------------------------------------------------ [2006-02-03 17:22:46] micheal dot winger at gmail dot com Description: ------------ When working with multi-dimensional arrays without keys.. it ignores the 2-nd dimension and only increments the first. Reproduce code: --------------- $array[][]="blah"; $array[][]="2nd"; print_r($array); Expected result: ---------------- I expect to see this on the website: Array ( [0] => Array ( [0] => blah ) [0] => Array ( [1] => 2nd ) ) Actual result: -------------- Array ( [0] => Array ( [0] => blah ) [1] => Array ( [0] => 2nd ) ) Notice that it is only incrementing the first array. I feel this is a problem since you can do $array[][] in the code, but then it renders useless if you want to have more than one value in the 2nd array, making it impossible to use this method. If possible, make it work like the expected result, and then add a small function just to jump the first array up.. but give support for higher than 2d arrays, allowing the user to specify which layer the user wants to increment. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36274&edit=1