I have a sub-navigation menu on my page that opens up whenever ?n=review
is appended to the URL.
I also have languages changing and session variables being set whenever ?language=xx
is appended.
However, if I am on a page with the sub-nav open, and I wish to change language from there, the ?n=review
is replaced with ?language=xx
upon link click, and therfore the sub-nav closes. How would I check to see if a $_GET
variable is already set every time the language is changed, and if so, append my additional one to the end?
Once the language has been changed, the new language is set to a session variable so I do not need to worry about keeping it's $_GET
variable. I'm wondering if I would need to store the sub-nav variable in the same way...?
Sorry if this question is worded badly, I'm trying to get my head around the logic myself.
If you need to see any code or tidier wording, please let me know before down-voting.