Convert to JSONYou can also convert the array to a JSON this way:
Add the json2.js file from here.
...and do this
Posting the ArrayIf you want to post the resulting array..
1. Prepare the PHP file that will receive the post value. I created get_post.php with the code:
2. Add a button and a new div area to our index.php
Div area where we can see the posted values..
3. Clicking the post array button will show the posted value to postedItems div.
The value posted to get_post.php look like this:
If you want to download the code or see the live demo: