/ Published in: PHP
I modified some code created by Macromedia Dreamweaver into a flexible function to rebuild the query string. The function is very useful for pagination or passing variables from one page to another.In this version it's possible to add more than one variable names into the functions arguments. This names will be filtered from the new generated query string. Just add the variable names you don't need into a comma seperated string.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php function rebuild_qs($curr_vars) { foreach ($parts as $val) { } } } else { return false; } return $qs; // this is your new created query string } else { return false; } } /* Example: script.php?ident=1<?php echo rebuild_qs("ident, submit, var_one"); ?> */ ?>
URL: http://www.finalwebsites.com/snippets.php?id=6