i have features stored in my db and I want to let the user edit them but i am having a problem displaying them correctly. These features are items such as:
fax, cable, tv, vcr, dvd, etc....
I am able to allow the user to add them using checkboxes and to keep the db consistent I want them to use the checkboxes to edit them as well. So when I display current features I would like the ones that are already selected to be checked and the ones that are not selected to be unchecked. I have an array that is hard coded with all the available features. The info is pulled out of the db and put into an array and I want these checked against the hardcoded array.
a basic example would be:
$hardcoded = Array("fax, "cable", "tv", "vcr", "dvd");
$infoFromDb = Array("fax", "tv", "dvd");
so all of the $hardcoded would be listed with checkbox and the only ones that would be checked would be the ones in the $infoFromDb array. So each element of the $infoFromDb array needs to be checked against each element of the $hardcoded array and listed as i have stated above. I don't exactly know how to go about this. I am assuming I will have to use multi-dimensional arrays but I have no idea where to start with this. Any help would be appreciated. Thanks for your time.