In the end, I'm looking to create a vocabulary quiz program, a sort of masochist's digital flash card.

Right now (this part works), the program randomly selects a vocab word from the database by its id. I can't seem to figure out how to have the program only select "cards" that aren't excluded. In each user's table, there is a field called vocab_exclude. The data in that field could be, for example: "5231,5233,5234" without the quotes. I planned to just explode this array, and if a "card" with an id on the list is selected, the script will go back and select another random card. I don't know much about arrays, and the methods that I tried didn't work. Maybe it would be possible to not randomly grab a "card" with an excluded id in the first place. I don't really know. That's why I'm here.