how can convert URL encoded JSON sent from my android application into PHP array.Current format i am getting looks like below format.
[{\\\"product_id\\\":\\\"33\\\",\\\"amount\\\":\\\"1\\\"},{\\\"product_id\\\":\\\"34\\\",\\\"amount\\\":\\\"3\\\"},{\\\"product_id\\\":\\\"10\\\",\\\"amount\\\":\\\"1\\\"}]
How can i convert those data into below format
product_id amount 33 1 34 3 10 1
Because i want to insert those data into MySQL database.Can anyone please help me regarding this problem.
json_decode(jsonencoded string, TRUE)is correct way to encode json string.But your json string encoded too deeper and recursive. your json encode string should as below
Other wise, you will get NULL value