This should be printing out a list of match types from one table as a list of check boxes. If the match type value exists separate table I want the checkbox to be checked. (however it will exists in that separate table as list separated by commas (,) instead of as individual rows) It dose work… however instead of displaying
[X] Cage Match, [X]Ladder Match, [ ] Tag Match, [ ] Hardcore Match
I’m Getting
[ ] Cage Match, [X] Cage Match, [X]Ladder Match, [ ]Ladder Match, [ ] Tag Match, [ ] Tag Match, [ ] Hardcore Match, [ ] Hardcore Match
Any Ideas?
[php]<?
$q = mysql_query(“Select type from match_type ORDER BY type”);
while ($r = mysql_fetch_array($q)) {
$t = htmlspecialchars($r[‘type’]);
$s = (explode(",",$e_match_type));
foreach ($s as &$value) {
if ($t == $value) {
echo(" $t "); // they cant all be value 12
}
else
echo(" $t "); // they cant all be value 12
}}
?>[/php]