I pull a string from the database looking like this:
$string = "location%5B%5D=Alabama-Tuscaloosa&location%5B%5D=Georgia-Atlanta&food%5B%5D=pizza";
What I want to do is print a sentence like:
Your search includes the Alabama-Tuscaloosa and Georgia-Atlanta areas, and topics concerning pizza.
I tried foreach, but I guess the string is not an array, though it looks like it with %5B%5D ([]). (?)
Sometimes the string will include multiple locations, one location, or no locations. Same with the topic, there may be multiple topics, one topic, or no topics. So, unfortunately, I can't just cut off x number of characters to get the info I want to display.
Thanks in advance for any help. 🙂