一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php数组的灵活应用

时间:2008-05-24 编辑:简简单单 来源:一聚教程网

php数组的灵活应用

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 .= "

  • \n";
        $this->form .= "\n";
        $this->form .= " ";
        $this->form .= "".$tip."\n";
        $this->form .= "
  • \n";
    }

    热门栏目