How do I keep a count of undefined strings within a loop using PHP?
- by mike
I'm using a loop within a loop to try to generate keyword combinations and also find the ones that have been used the most.
My outside loop just queries a list of keywords (lets use "chicago" as our first keyword, 3 records were found).
The inside loop finds all the records in the "posts" table where keyword = "chicago".
Within this loop, I need to generate strings based on info I found in the database. Which, would look something like "chicago bulls", "chicago bears", "chicago cubs" etc... I know how to do everything up until this point, but how do I temporary hold these generated strings and count how many times they have been found within the 3 records?