1

I am using Codeigniter to develop APIs and I am required to accept data in application/x-www-form-urlencoded format instead of JSON.

I am not getting how to store and input request data as array in a variable.

vraj
  • 31
  • 4
  • Take a look on this link : https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data , i think that's you need . – Abd Abughazaleh Jan 08 '19 at 13:56

1 Answers1

0

Use the same key multiple times, and put square brackets on the end.

animals[]=cat&animals[]=dog
Quentin
  • 914,110
  • 126
  • 1,211
  • 1,335