Consider this form:
I usually write something like this:
foreach($_GET as $key=>$content){ echo ""; }
This is working, but don't forget to sanitize your inputs against XSS attacks!