I have a form and I am using AJAX when user clicks on submit button. In AJAX related PHP page I have used $_POST (with out specifying the related values) .
This is working fine. But now I have implemented one bootstrap dialog box popup on that form. Now from my post method I am getting values from the dialog box also. This leads me into problem.The values are coming from bootstrap modal are dynamic values. Here is my post array.
Array(
[start_val] => 0
[accept-82RUFA55] => Array
(
[0] => 4046228181417
[1] => 4046228181448
[2] => 331800000221
)
[hidden_order_id244] => 82RUFA55
[asin244] => 331800000221
[accept-82RUFA54] => Array
(
[0] => 4046228181417
[1] => 4046228181448
[2] => 331800000221
)
[hidden_order_id239] => 82RUFA54
[asin239] => 331800000221
[accept-82RUFA53] => Array
(
[0] => 4046228181417
[1] => 4046228181448
[2] => 331800000221
)
)
But my desired Array should be like below.
Array
(
[start_val] => 0
[accept-82RUFA55] => Array
(
[0] => 4046228181417
[1] => 4046228181448
[2] => 331800000221
)
[accept-82RUFA54] => Array
(
[0] => 4046228181417
[1] => 4046228181448
[2] => 331800000221
)
[accept-82RUFA53] => Array
(
[0] => 4046228181417
[1] => 4046228181448
[2] => 331800000221
)
)
In array elements to hidden_order_id and asin I am concatenating the unique id.
This id is dynamic one. So I want to delete those elements from Array. So how to remove those values from my array ? Any help would be greatly appreciated.