I'm sure this is a pretty simple question, but it's got me baffled.
I have a mySQL column with data that's comma-delimited. Numbers only.
I want to take that data and remove those numbers from a counting list.
To be more specific:
I'm trying to automate a game we're playing.
There are 16 NFC teams, which I have stored in an array $NFC[0]...$NFC[15].
Likewise for the AFC.
Each player chooses one team per week, and cannot choose that team again for the season. So, when the player is confronted with a new selection list, the teams they've chosen should not show up as options.
I have a mySQL column for each player that stores each selected team in a comma-delimited list.
I want to remove the list items from the teams array, then display the rest.
I tried this, which obviously didnt work :
$afcpicks=array($row['AFC']);
I tried this, which doesn't make much sense but I may not have done correctly:
for ($a=0;$a<16;$a++){
for ($b=0;$b<count($afcpicks);$b++){
if ($afcpicks[$b]!=$a){
$achoices .= $a;
}
}
}
I guess I need to split the $row['AFC'], then create an array, but I'm lost on how to do that.