Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
CodeIgniter Table类是否可以在没有cellspacing/cellpadding的情况下生成表_Codeigniter - Fatal编程技术网

CodeIgniter Table类是否可以在没有cellspacing/cellpadding的情况下生成表

CodeIgniter Table类是否可以在没有cellspacing/cellpadding的情况下生成表,codeigniter,Codeigniter,正如标题所述,我正在寻找一种使用table类生成表的方法,即使用$this->table->generate($data),而不使用cellspacing和cellpadding属性,因为这些属性不再被视为有效 正如w3c验证程序所述,“table元素上的cellpadding属性已过时。请改用CSS。”在生成表之前设置模板 $this->table->set_template(array( 'table_open' => '<table>' )); 如果

正如标题所述,我正在寻找一种使用table类生成表的方法,即使用
$this->table->generate($data)
,而不使用cellspacing和cellpadding属性,因为这些属性不再被视为有效


正如w3c验证程序所述,“table元素上的cellpadding属性已过时。请改用CSS。”

在生成表之前设置模板

$this->table->set_template(array(
    'table_open' => '<table>'
));

如果只需要将其应用于特定的表,请使用CSS类并使用模板配置应用该类。

在生成表之前设置模板

$this->table->set_template(array(
    'table_open' => '<table>'
));
如果只需要将其应用于特定表,请使用CSS类并将该类与模板配置一起应用