I am pulling an array from a mysql database. A pretty simple select
statement that then gets put into your run-of-the-mill multi-dimension array (rows and columns) to generate some HTML. So far so good.
I want to be able to store that array somewhere (DOM?) on the client-side so that clients can re-use and manipulate that data (via jQuery) without having to re-query the database for the same data each time.
So... lets say my php array is:
$fruits = array ( "fruits" => array ( "a" => "orange",
"b" => "banana",
"c" => "apple"
),
"numbers" => array ( 1,
2,
3,
4,
5,
6
),
"holes" => array ( "first",
5 => "second",
"third"
)
);
How do I store $fruits
on the client-side so I can re-use the data on command via javascript?