Would anyone happen to know the PHP equivalent to C#’s datatable? I’ve considered (briefly) using a two-dimensional array, but consider it to be kind of dirty. Is there another data structure which might work for storing various types of data in a two-dimensional, row / column oriented (perhaps with headers?), easily-accessible fashion?
My other options is creating a DataTable structure for PHP, which I’d prefer to avoid, if at all possible.
All of PHP’s built-in types are much simpler than that.
Your best bet is to look in to an ORM library for PHP, which is where that type of functionality would be, if anyone has done it, but of course it would be very database oriented (kinda like DataTable is).
If all you want is rows, columns, and headers, then that’s simple enough to roll your own — maybe 30 to 40 lines of code or so. It’d probably be faster to make your own rather than find someone else’s anyway.