user3550203 user3550203 - 1 year ago 92
PHP Question

Get query string value from parameter that contains [ ]

I need to get values from a query string but this is a special condition. I have the following url:[email]

But I get the url in this format

I tried using generic
but its not working.

I also tried:


But its not working either. Can anyone please tip me how can I get solution for this.

Answer Source

if your form looks like this:

  <input type="email" name="custom_field[email]"/>
  <input type="submit"/>

and you submit, then your url will look like this:


you can see what the data looks like with:


which will display:

    [custom_field] => Array
            [email] =>


so you can specifically reference the entity with:

echo $_GET['custom_field']['email'];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download