PHP Classes

Multi-Dimensional Array Handler: Access multi-dimensional arrays with a single key

Recommend this page to a friend!
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (4)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 40%Total: 1,123 All time: 3,346 This week: 289Up
Version License PHP version Categories
marray 1.0GNU General Publi...5PHP 5, Data types


This class can be used to access multi-dimensional array entries with a single string entry key.

It allows to reference elements of an array an arbitrary depth using a single string that represents the element array indexes separated with commas.

The class can take an element index string and set or get its value, check if the element is set, or check it is empty or return the count of entries if the element is an array.

Innovation Award
PHP Programming Innovation award nominee
February 2008
Number 8

Prize: One copy of Delphi for PHP
Multi-dimensional arrays present a challenge to developers that need to reference elements of the arrays, which is the fact that you need a variable number of indexes to reference an element depending on its depth.

This class provide a solution to this problem by allowing to reference and manipulate an element by using a single string that comprises all the indexes of the element.

Manuel Lemos
Picture of Colin Jermain
Name: Colin Jermain <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 2203308 in United States United States
Week rank: 578 Up70 in United States United States Up
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file obj.marray.php Class marray Uncompressed Object
Plain text file obj.marray.compressed.php Class marray Compressed Object
Accessible without login HTML file Documentation Doc. The object and function documentation.
Accessible without login Plain text file func.marray.compressed.php Aux. Alternative Compressed Functions
Accessible without login Plain text file func.marray.php Aux. Alternative Uncompressed Functions
Accessible without login Plain text file License Lic. Package License

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,346
This week:289Up
User Ratings User Comments (1)
 All time
eval? Not really, huh?
15 years ago (Martin)