kihinimi=$nimetus;
}
public function lisa($arv){
array_push($this->arvud, $arv);
}
public function kogus(){
return count($this->arvud);
}
public function html(){
$t="
";
foreach($this->arvud as $arv){
$t.="
$arv
";
}
$t.="
";
return $t;
}
public function vorm(){
//Olemasolevad väärtused kuvatakse vormi väljades
$t=$this->kihinimi.": ";
foreach($this->arvud as $arv){
$t.="";
}
$t.="";
$t.=" ";
return $t;
}
public function loeVormist(){
// if(isSet($_REQUEST["{$this->kihinimi}_salvestus"])){
$this->arvud=array();
if(isSet($_REQUEST["{$this->kihinimi}_a"])){
foreach($_REQUEST["{$this->kihinimi}_a"] as $arv){
if($arv){
$this->lisa($arv);
}
}
}
//}
}
}