我有一个名为$ pdfc []的关联数组。我必须使用codeigniter和php将这个关联数组转换为服务器上的pdf文件。我正在使用cezpdf库在服务器上转换为pdf文件.Below代码适用于较少数量的列(3-4)。对于更多列(> 8),我应该在代码中更改什么?
//below is associative array
$pdfc[] = array('1000','2000','30000','10','15','16','17','20','111');
$pdfc[] = array('3000','4000','5000','10','12',14','16','20','111');
$pdfc[] = array('2000','4000','5000','20','12','10','11','12','111');
//code to convert
$h = array('1st distance','2nd distance','3rd distance','4th distance','5th distance','6th distance','7th distance','8th distance','9th distance');
$this->load->library('cezpdf');
$this->cezpdf->ezTable($pdfc, $h, 'code', array('width'=>550));
$this->cezpdf->ezStream(array('download' => 1));