Search code examples
phpmultidimensional-arrayquery-stringhardcode

Manually write a url query string containing nested array data


I'm looking to manually write a multidimensional $_GET query string, saw this done the other day, but can't quite remember it!

something like:

www.url.com?val1=abc&val2=cde&[val3=fgh&val4=ijk]

Solution

  • http://domain.tld/path/to/script.php?arr[a][b][c]=foo
    

    and

    var_dump($_GET);