|
楼主 |
发表于 2010-11-15 19:08:16
|
显示全部楼层
本帖最后由 julia 于 2010-11-16 04:14 编辑
因为要处理utf8,所以还要回到循环处理,然后再单独取值
--------------models
$fields = $this->db->field_data($table);
foreach ($fields as $row){
if ($row->type=='string') $row->len = $row->len/3; //utf8
$field[] = $row;
}
$form_data = array( //请问这里如何写
'id' => array('type'=>'input', 'size'=>20,'maxlength'=>$field['id']->len,'value'=>$value['id'],'name'=>'id','id'=>'id','readonly'=>'readonly' ),
'name' => array('type'=>'input', 'size'=>20,'maxlength'=>$field['name']->len,'value'=>$value['name'],'name'=>'name','id'=>'name' )
);
return $form_data; |
|