For visual representation, for simplicity and of course to feed my curiosity, I'm wondering how to convert a PHP array into a valid PHP resource.
See the below example:
(example image created with dBug component available at http://dbug.ospinto.com/)
I've made 3 examples:
- resource: this is the typical representation of a MySQL resource, visualized as a grid
- object: a handmade create object from an array
- array: a handmade multidimensional array
As you can see, the resource is a visual beauty, while the object and array are constructed by using multidimensional arrays, using poor numeric array indexes to bind them together :(
What I'm looking for, would probably be something like this:
$resource_var = (resource) $array_var;