当前位置:网站首页>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

边栏推荐
- 0x0fa23729 (vcruntime140d.dll) (in classes and objects - encapsulation.Exe) exception thrown (resolved)
- Schnuka: machine vision positioning technology machine vision positioning principle
- Hdu-2196 tree DP learning notes
- OpenGL glLightfv 函数的应用以及光源的相关知识
- I'd rather say simple problems a hundred times than do complex problems once
- 优雅的 Controller 层代码
- 软考中级,软件设计师考试那些内容,考试大纲什么的?
- Summary of router development knowledge
- 字符串格式化
- . Net configuration system
猜你喜欢
![P1031 [noip2002 improvement group] average Solitaire](/img/ba/6303f54d652fa7aa89440e314f8718.png)
P1031 [noip2002 improvement group] average Solitaire

Deeply analyze the main contents of erc-4907 agreement and think about the significance of this agreement to NFT market liquidity!

P2788 数学1(math1)- 加减算式

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

Leetcode-560: subarray with sum K
![P1031 [NOIP2002 提高组] 均分纸牌](/img/ba/6303f54d652fa7aa89440e314f8718.png)
P1031 [NOIP2002 提高组] 均分纸牌

IIC Basics

【STM32】STM32烧录程序后SWD无法识别器件的问题解决方法

Application of OpenGL gllightfv function and related knowledge of light source

High number_ Chapter 1 space analytic geometry and vector algebra_ Quantity product of vectors
随机推荐
Prototype object in ES6
Some properties of leetcode139 Yang Hui triangle
555电路详解
深入理解Apache Hudi异步索引机制
[dai6] mirror image of JZ27 binary tree
Guid primary key
【作业】2022.7.6 写一个自己的cal函数
ThreadLocal is not enough
[牛客网刷题 Day5] JZ77 按之字形顺序打印二叉树
[homework] 2022.7.6 write your own cal function
Trajectory planning for multi-robot systems: Methods and applications 综述阅读笔记
CC2530 zigbee IAR8.10.1环境搭建
南航 PA3.1
那些易混淆的概念(三):function和class
施努卡:机器视觉定位技术 机器视觉定位原理
555 circuit details
软考中级,软件设计师考试那些内容,考试大纲什么的?
Remote meter reading, switching on and off operation command
gym安装踩坑记录
宁愿把简单的问题说一百遍,也不把复杂的问题做一遍