From: Operating system: all PHP version: Irrelevant Package: Arrays related Bug Type: Feature/Change Request Bug description:True multidimensional arrays
Description: ------------ The current PHP arrays of arrays approach to handling complex structures is very powerful and flexible, but it has some real limitations that require you to write workarounds that wouldn't be necessary if PHP also supported true multidimensional arrays. For example if you have an array of arrays that represents a piece of tabular data, and you need to be able to sort the table on both of its axes, then you can only sort easily on one axis with one of the array sorting functions. For the other, you have to foreach(0 over the array, then sort each element in turn to achieve sorting on the opposite axis. Additionally, you can only easily add or remove elements on one axis. Again, the other axis would require a foreach. Real multidimensional arrays would allow for more flexible processing of data that should be treated as tabular and would be a worthwhile addition to PHP's array toolkit. -- Edit bug report at http://bugs.php.net/bug.php?id=53978&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53978&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53978&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53978&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53978&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53978&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53978&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53978&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53978&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53978&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53978&r=support Expected behavior: http://bugs.php.net/fix.php?id=53978&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53978&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53978&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53978&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53978&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53978&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53978&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53978&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53978&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53978&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53978&r=mysqlcfg
