I am working on a PHP controller, this is the URL:
www.example.com?field1=test1&field2=test2&field3=test3
I know I can get the value by this:
$_GET['field1'] // this will return test1
But I need something to return the name of the field, in this case field1
, so I'm wondering if I can loop through the $_GET
variable, but I'm not sure how.