"; } // uso: // $fieldName : nome do campo // $values : vetor com (valor => texto) // $startTag : tag inicial do conjunto de inputs // $endTag : tag final do conjunto de inputs // $itemStartTag : tag inicial de cada input // $itemEndTag : tag final de cada input function checkboxes($fieldName, $values, $startTag, $endTag, $itemStartTag, $itemEndTag){ $r = $startTag; $n = explode("/", $fieldName); $int = (isset($this->data[$n[0]][$n[1]])) ? $this->data[$n[0]][$n[1]] : NULL; $x = 0; foreach($values as $ti=>$t){ $r .= $itemStartTag.$this->checkbox($fieldName, $ti, $t, $x++, $int).$itemEndTag; } $r.= $endTag; return $r; } } ?>