I need help here in my practice program. I have a json array:
myData=[{"plank_number":"1","thickness":"5","width":"7","length_t":"8","quantity":"1"},
{"plank_number":"2","thickness":"5","width":"6","length_t":"7","quantity":"1"},
{"plank_number":"3","thickness":"6","width":"7","length_t":"8","quantity":"1"},
.........................(could be more)]
this array is generated everytime you add plank in my grid (jqgrid). I also have here a php file with some html tag. What I am confused about is how will I code my .php program so that it will accept my variable myData and create another table in from it.
EDIT
My questions are: How to POST a JSON array to an other page? and,
How to output the JSON array in an html table?
I have a submit button in here in my html file. And my variable myData is from my javascript file. Thanks
You have to use json_decode to convert the post data into a php associative array then you can loop through it and generate the table.
Something along the lines of….
http://php.net/manual/en/function.json-decode.php