I am receiving an associative array from PHP via $_GET through the following url:
example.com/example.php?itemcount[A]=2&itemcount[B]=3
The result of using json_encode() is the following:
{ "A" : "2", "B" : "3" }
I want to send this to another php file via ajax. How can I do this?
EDIT:
I additionally want to send other variables such as through data: {"var1" : "val1", "var2" : "val2", "var3" : "val3" }
.
How can I send all of these?