PHPWORD 我怎样才能不间断地使用函数 addText
PHPWORD how can i use function addText without break
示例:你好世界
我想在一个段落中显示以上内容而不打散
add Text("hello");
add Image('image URL');
add Text("hello");
这样。会有3次休息
哪一段会影响分手?
PHPWord addTextRun method's description
使用 textrun,您可以在一个段落中添加文本和文本分隔符。
$textrun = $section->addTextRun();
$textrun->addText("hello");
$textrun->addImage('image URL');
//if you want to seperate the text
//$textrun->addTextBreak();
$textrun->addText("hello");
示例:你好世界
我想在一个段落中显示以上内容而不打散
add Text("hello");
add Image('image URL');
add Text("hello");
这样。会有3次休息
哪一段会影响分手?
PHPWord addTextRun method's description
使用 textrun,您可以在一个段落中添加文本和文本分隔符。
$textrun = $section->addTextRun();
$textrun->addText("hello");
$textrun->addImage('image URL');
//if you want to seperate the text
//$textrun->addTextBreak();
$textrun->addText("hello");