This page is quite configurable with different parameters. So, it may be called like:
www.example.com/index.php?test=1&foo=3&bar=4
Now my question is, what is the idiom for generating a link to the current page but with one parameter changed?
For example, I’d like to change foo to 5, what’s the easiest way to generate a link like:
www.example.com/index.php?test=1&foo=5&bar=4
I can loop through and do it manually, but I figured there would be some common idiom for this.
array_merge() is what you’re looking for