Hey there! Quite new to the forums so, be kind. 🙂
I'm creating this script that reads an external XML file and populates a database.
There are 10 different class ID's (1, 2, 3, 4, 5, 6, 7, 8, 9 and 11) and I'm defining variables as true for every occurance of class ID before looping.
While in the loop, what I want to achieve is counting the class ID's, if for instance there are no members with class ID 1 I want to tag it's variable as false, however, it's not really going my way.
So far, I've tried doing this in a few ways.
- With the returned mysql information, doing checks in a while loop
- Exported the returned mysql information in to a single array and doing checks in a foreach loop.
I know I could simply use mysql and make a query for every class ID, then tag them as true/false, but, there has to be an easier way then having to define everything ~10 times.
Home there's someone out there who has an idea what I'm talking about! Cheers.