I have a json_decoded string passed by AJAX array in the format :
Array (
[dta] => [
{ "a" : 1, "b" : "string" , "c" : ""},
{ "a" : 8, "b" : "string 2" , "c" : "12/12/2022"}
]
[vars] => [
7,
12
]
)
The items pointed to by dta need to be looped through to be added to a datatable. The number of individual "sub arrays" could be from 1 to 40.
The 2 integers pointed to by vars need to be assigned tro PHP variables.
This doen't follow any other associative array I have dealt with, so can any one point me at how to parse the above?
Array (
[dta] => [
{ "a" : 1, "b" : "string" , "c" : ""},
{ "a" : 8, "b" : "string 2" , "c" : "12/12/2022"}
]
[vars] => [
7,
12
]
)
The items pointed to by dta need to be looped through to be added to a datatable. The number of individual "sub arrays" could be from 1 to 40.
The 2 integers pointed to by vars need to be assigned tro PHP variables.
This doen't follow any other associative array I have dealt with, so can any one point me at how to parse the above?