I have an array called $ data that needs to be updated with data from an ajax call.
There are two variables sent via an ajax call (with examples of inputs):
sectionDetails :
[111][0][2][0][service_providers][]
serviceProvider :
Google
ServiceProvider is the data, and sectionDetails is the array the service provider should be in, in the $ data array.
I need the $ data array to end as:
$data = Array
(
[111] => Array
(
[0] => Array
(
[2] => Array
(
[0] => Array
(
[service_providers] => Array
(
[0] = Google
)
)
)
)
)
)
This way, I can dynamically enter data into any cell, and then I can update certain arrays (for example, $data[111][0][2][0][service_providers][0]
= "Yahoo"
;
$_POST['sectionDetails']
is, however, the line in which the problem is.
, $data ( )?
, .