[英]Parse xml file - PHP - html tags
我使用SofeeXmlParser解析xml文件。 該文件除其他外包括說明。 我需要在這行的描述中添加一些句子。 可能嗎?
這樣的描述輸出如下:
(
[value] =>
TEXT TEXT TEXT TEXT TEXT
Text text text, text text text text text text.
Text text text, text text text text text text. Text text text, text text text
Text text text, text text text text text text. Text text text, text text text text text text. Text text text, text text text text text text.
TEXT TEXT TEXT.
)
我將xml文件的輸出放到mysql中,然后我想在我的網站上顯示它,但是我想在新行中添加一些句子,例如此輸出。
使用nl2br()
php函數將<br />
在每個新行上
例:
echo nl2br($arrayData['value']);
// this will replace all the new line character with <br />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.