PHP Classes

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    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 557 All time: 5,466 This week: 206Up
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
Picture of troy knapp
Name: troy knapp is available for providing paid consulting. Contact troy knapp .
Classes: 2 packages by
Country: United States United States
Age: 41
All time rank: 2696371 in United States United States
Week rank: 321 Up31 in United States United States Up
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:557
This week:0
All time:5,466
This week:206Up