PHP Classes

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

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStar 39%Total: 1,124 All time: 3,354 This week: 206Up
Version License PHP version Categories
marray 1.0GNU General Publi...5PHP 5, Data types
Description 

Author

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
Innovation award
Innovation award
Nominee: 1x

 

  Files folder image Files (6)  
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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:1,124
This week:0
All time:3,354
This week:206Up
User Ratings User Comments (1)
 All time
Utility:50%StarStarStar
Consistency:68%StarStarStarStar
Documentation:75%StarStarStarStar
Examples:-
Tests:-
Videos:-
Overall:39%StarStar
Rank:3914
 
eval? Not really, huh?
17 years ago (Martin)
15%Star