+ . '<td class="col_check" style="width:1%"><input type="checkbox" name="new_' . $name . '[' . ($index++) . ']" id="' . $name . '_list_item_' . $key . '" value="' . $value;
+
+ // having a selected item in the edit list doesn't have
+ // any meaning, but maybe someone will think of a way to
+ // use it, so we might as well put the code in
+ //
+ foreach ($selected as $default) {
+ if ((string)$default == (string)$value) {
+ echo '" checked="checked';
+ break;
+ }
+ }
+
+ echo '"></td>'