讯睿CMS问答:把某一条数据生成到word文档里面,怎么能生成x区x排x座呀

讯睿CMS问答:把某一条数据生成到word文档里面,怎么能生成x区x排x座呀

2024-05-01 XunRuiCMS Sincere

问题:

我用迅睿的后台做了一个管理系统,稍微改了改,把模块的其中一个字段改成了属性参数,如下图


image

然后我需要把某一条数据生成到word文档里面,现在可以正常生成,但是这个属性参数的这个weizhi字段,生成出来是这样的,我怎么能生成x区x排x座呀

$title = $row['title']; $jsdh = $row['jsdh']; $szxmn = $row['szxmn']; $szxmnn = $row['szxmnn']; $weizhi = $row['weizhi'];//这里是位置字段 // 时间戳转换 $rumushijian1 = $row['rumushijian']; $daoqishijian1 = $row['daoqishijian']; $rumushijian = date('Y-m-d', $rumushijian1); $daoqishijian = date('Y-m-d', $daoqishijian1); // 开始对模板赋值 $templateProcessor->setValue('title', $title); $templateProcessor->setValue('jsdh', $jsdh); $templateProcessor->setValue('szxmn', $szxmn); $templateProcessor->setValue('szxmnn', $szxmnn); $templateProcessor->setValue('weizhi', $weizhi); $templateProcessor->setValue('rumushijian', $rumushijian); $templateProcessor->setValue('daoqishijian', $daoqishijian);


image

答案:


image

$weizhi = dr_string2array($row['weizhi']);//这里是位置字段

把他转换为数组,剩下的,你应该搞得定了

@官方研发技术-陈老师:搞定啦,太感谢啦,!!