Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
Hi, I have resolved this way:
$testo='First line
Second line';
$testo=lf2lf($testo);
$aTesto=explode('\\n',$testo);
foreach ($aTesto as $testo) {
$docx->addText($testo);
}
function lf2lf($text) {
$return=str_replace("\\n",'\\n',$text);
$return=str_replace("\\r\\n",'\\n',$return);
return $return;
}
Hope this help,