Skip to content
Advertisement

Parse query string into an array

How can I turn a string below into an array?

JavaScript

This is the array I am looking for,

JavaScript

Advertisement

Answer

You want the parse_str function, and you need to set the second parameter to have the data put in an array instead of into individual variables.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement