Hi all,
I am trying to use urllib.urlencod e to post a multidimensiona l dictionary to a php page.
This is the code I am using
And if I do a print of the post variable from php my output is looking like this
Only the first key of the dictionary is being preserved while everything underneath is being squished into a string.
Is there a way to preserve the entire structure of the dictionary?
Thanks!
I am trying to use urllib.urlencod e to post a multidimensiona l dictionary to a php page.
This is the code I am using
Code:
test = {}
test['boom'] = {}
test['boom']['zoom'] = "bang"
server_params = urllib.urlencode(test)
response = urllib2.urlopen(server_url, server_params).read()
Code:
Array
(
[boom] => {\'zoom\': \'bang\'}
)
Is there a way to preserve the entire structure of the dictionary?
Thanks!