Flexible application of PHP arrays
function Addinput ($a)
{
if (Is_array ($a))
{
$title = $a [' title '];
$name = $a [' name '];
$value = $a [' Value ']? $a [' Value ']: "";
$type = $a [' type ']? $a [' type ']: "text";
$maxlength = $a [' maxlength ']? $a [' maxlength ']: "255";
$readonly = $a [' readonly ']? $a [' ReadOnly ']: "";
$required = $a [' Required ']? $a [' Required ']: "false";
$check = $a [' Check '];
$id = $a [' id '];
$width = $a [' width '];
$tip = $a [' Tip '];
}
$title, $name, $value = "", $type = "Text", $maxlength = "255", $readonly, $required = "false", $check, $id, $width, $tip
$this->form. = "<li>\n";
$this->form. = "<label>". $title. ": </label>\n";
$this->form. = "<input name=\" ". $name." \ "Value=\" ". $value." \ "Type=\" ". $type." \ "Maxlength=\" ". $maxlength." \ "Required=\" ". $required." \ "Check=\" ". $check." \ "Id=\" ". $id." \ "Class=\" input\ "". $readonly. "Style=\" width: ". $width." Px;\ "Showname=\" ". $title." \ "/>";
$this->form. = "<span class=\" tip\ ">". $tip. " </span>\n ";
$this->form. = "</li>\n";
}