Created
September 23, 2016 05:41
-
-
Save MikSDigital/6034822b95249723c59f3a5164fe911f to your computer and use it in GitHub Desktop.
convert url parameters to variables (GET)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_GET)) { | |
foreach ($_GET as $key => $value) { | |
if(!empty($value)) { | |
${$key} = trim($value); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment