当前位置:网站首页>PHP \ newline cannot be output
PHP \ newline cannot be output
2022-07-07 10:33:00 【zhang-php】
From the interface json Array , There is a newline in the text part of the array , use json_decode turn php After array , Output in html The page didn't wrap , At first, I thought that the newline symbol was deleted after the array was converted , Later, I tried various methods to replace characters , Finally, we found one CSS style :
white-space Property specifies how whitespace within an element is handled , The default value is normal( Blank will be ignored by browser )
Property value
| value | describe |
|---|---|
| normal | Default . Blank will be ignored by browser . |
| pre | Blank space will be reserved by browser . It behaves in a similar way HTML Medium <pre> label . |
| nowrap | Text does not wrap , The text will continue on the same line , Until I met <br> Label until . |
| pre-wrap | Keep blank sequence , But wrap normally . |
| pre-line | Merge whitespace sequence , But keep line breaks . |
| inherit | Rules should be inherited from the parent element white-space The value of the property . |
<td style="white-space:pre-wrap">{$vo.content}</td>After adding this attribute, the line will wrap automatically

边栏推荐
- Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
- Factorial implementation of large integer classes
- Mendeley--免费的文献管理工具,给论文自动插入参考文献
- 1321: [example 6.3] deletion problem (noip1994)
- ThreadLocal会用可不够
- 那些易混淆的概念(三):function和class
- 深入分析ERC-4907协议的主要内容,思考此协议对NFT市场流动性意义!
- CAS mechanism
- ArrayList线程不安全和解决方案
- About hzero resource error (groovy.lang.missingpropertyexception: no such property: weight for class)
猜你喜欢

JMeter loop controller and CSV data file settings are used together

High number_ Chapter 1 space analytic geometry and vector algebra_ Quantity product of vectors
![1324: [example 6.6] integer interval](/img/5d/29db4d51ec7a2685f8aeffe5be68da.png)
1324: [example 6.6] integer interval

Review of the losers in the postgraduate entrance examination

软考中级有用吗??

openinstall与虎扑达成合作,挖掘体育文化产业数据价值

Applet jump to H5, configure business domain name experience tutorial

ArrayList thread insecurity and Solutions

多线程-异步编排

Smart city construction based on GIS 3D visualization technology
随机推荐
ThreadLocal is not enough
Leetcode-303: region and retrieval - array immutable
Vs code specifies the extension installation location
Kotlin实现微信界面切换(Fragment练习)
对word2vec的一些浅层理解
Trajectory planning for multi robot systems: methods and Applications Overview reading notes
Socket通信原理和实践
成为优秀的TS体操高手 之 TS 类型体操前置知识储备
ThreadLocal会用可不够
南航 PA3.1
电表远程抄表拉合闸操作命令指令
leetcode-304:二维区域和检索 - 矩阵不可变
@Configuration, use, principle and precautions of transmission:
How embedded engineers improve work efficiency
IO model review
软考中级电子商务师含金量高嘛?
使用U2-Net深层网络实现——证件照生成程序
[dai6] mirror image of JZ27 binary tree
Some properties of leetcode139 Yang Hui triangle
Study summary of postgraduate entrance examination in November