PHP Classes
elePHPant
Icontem

Multidim: Manipulate multidimensional arrays in MySQL tables

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2011-01-01 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 552 All time: 5,284 This week: 789Up
Version Licenses PHP version Categories
multidim 1.1Artistic License, B...5.0PHP 5, Databases, Data types
Description Author

Have you ever wished you could deal with tables instead of multidimensional arrays, but didn't want the overhead associated with creating tables, populating them etc? This class is meant to be a simple alternative to using large associative data arrays. Elements are just as easy to add into temporary tables as they are to put into arrays, they are just as easy to get back out again... and MUCH easier to unset, filter and sort.

This class works by using an "array like" syntax (so it's easy to remember) and creates MySQL tables in memory. Basic functionality that you would expect to have when dealing with arrays is provided (in fact, you'll notice a striking similarity to what the methods "md_push" and "md_asort" do and their cousins do), but it leverages MySQL's ability to sort filter and delete etc. to simplify dealing with complex arrays. It also provides a wrapper method that allows the user to run their own SQL queries on the table (without having to worry about database connections or what the temporary table's name is).

Innovation Award
PHP Programming Innovation award nominee
December 2010
Number 3


Prize: One downloadable copy of Komodo IDE
If you need to store multi-dimensional persistently, using a SQL database may be a way to achieve it. However, that is not trivial to implement.

This class provides a solution to greatly simplify the task of manipulating multi-dimension arrays stored in a MySQL database by the means of query language that allows inserting and finding array entry values.

Manuel Lemos
Name: troy knapp <contact>
Classes: 2 packages by
Country: United States United States
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Plain text file Multidim.php Class source file
Plain text file example.php Example several examples showing how to use the class and what it can do with outputs

 Version Control Unique User Downloads Download Rankings  
 0%
Total:552
This week:0
All time:5,284
This week:789Up