当前位置:网站首页>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)
- [dai6] mirror image of JZ27 binary tree
- Five simple and practical daily development functions of chrome are explained in detail. Unlock quickly to improve your efficiency!
- 优雅的 Controller 层代码
- Openinstall and Hupu have reached a cooperation to mine the data value of sports culture industry
- Review of the losers in the postgraduate entrance examination
- 成为优秀的TS体操高手 之 TS 类型体操前置知识储备
- 对word2vec的一些浅层理解
- 小程序跳转H5,配置业务域名经验教程
- 根据设备信息进行页面跳转至移动端页面或者PC端页面
猜你喜欢
原型与原型链
Applet jump to H5, configure business domain name experience tutorial
Encrypt and decrypt stored procedures (SQL 2008/sql 2012)
电表远程抄表拉合闸操作命令指令
枪出惊龙,众“锁”周之
【HigherHRNet】 HigherHRNet 详解之 HigherHRNet的热图回归代码
浅谈日志中的返回格式封装格式处理,异常处理
Some properties of leetcode139 Yang Hui triangle
Pre knowledge reserve of TS type gymnastics to become an excellent TS gymnastics master
Trajectory planning for multi-robot systems: Methods and applications 综述阅读笔记
随机推荐
ArrayList thread insecurity and Solutions
IIC Basics
Leetcode-560: subarray with sum K
[higherhrnet] higherhrnet detailed heat map regression code of higherhrnet
Study summary of postgraduate entrance examination in November
leetcode-560:和为 K 的子数组
串口通讯继电器-modbus通信上位机调试软件工具项目开发案例
CC2530 zigbee IAR8.10.1环境搭建
Study summary of postgraduate entrance examination in October
Serial communication relay Modbus communication host computer debugging software tool project development case
MySQL insert data create trigger fill UUID field value
BigDecimal数值比较
ThreadLocal会用可不够
Slurm资源管理与作业调度系统安装配置
Gym installation pit records
Use the fetch statement to obtain the repetition of the last row of cursor data
5个chrome简单实用的日常开发功能详解,赶快解锁让你提升更多效率!
Mendeley--免费的文献管理工具,给论文自动插入参考文献
[sword finger offer] 42 Stack push in and pop-up sequence
【华为机试真题详解】高矮个子排队