php - MySQL Comma data into array, then selected
So I have this data in a row in my database (MySQL), I can get it from there into an array, but now I need to have it selected if they match.
For exmaple:
Database information: No Incentives, No Twitter, No Youtube, No SMS, No Email, No PPC
Now I have an HTML that will check if they match but I am having issues doing that, how would you go about that?
Thanks.
For some reason I always have trouble with comma data.
Answer
Solution:
Without details about what you are actually doing or how you are transforming the output of your SQL query in php... simple put the output of your HTML input checkbox requires an attribute
checked="checked"
for the ones you want checked by default.