So I currently have this:
var queries = window.location.search.slice( 1 ).split( "&" );
if(queries !== "") {
var count = 0,
........
........
It's getting all of the $_GET's that are submitted to a search. Well, for added functionality to display only the "active" attributes used in the search, I had to add more $_GET's and that's screwing up the above code because what it's running the split through is like this:
?search_type=physical&4=64_to_74_weight_1&active_4=true&10=70_to_84_weight_1&active_10=true&6=0_to_0_weight_1&7=0_to_0_weight_1&8=0_to_0_weight_1&9=0_to_0_weight_1&118=0_to_0_weight_1
What I need to do is exclude any "&active_#=true"s that are there and the amount of them won't always be the same.
Would I somehow use Regex for this? I'm not very familiar with it so I don't know where to start with the Regex bit.
Does anybody have any ideas or help for this?