php - 如何将制表符空间添加到 php 函数
问题描述
我正在尝试将选项卡空间添加到 php 函数。我尝试使用多个空格,'\t',但两者都不起作用
这是我的功能
public function getProductDescription()
{
return $this->name."\t". $this->carton_quantity .' * '. $this->weight.' g';
}
解决方案
利用html_entity_decode()
public function getProductDescription()
{
return html_entity_decode($this->name." ". $this->carton_quantity .' * '. $this->weight.' g');
}
推荐阅读
- r - 如何获得包含整个数据集的岭回归?
- python - 在 python 中使用机器人查找局部最小值
- amazon-web-services - AWS S3 不允许在删除后重命名/移动文件夹:拒绝设置为存储桶策略
- class - NameError:未定义名称“用户”
- python - 来自python文件的Kivy标签对齐
- git - 当 master 不允许合并提交时支持 Git 中的主要功能分支
- vba - VBA宏计算MS Word文档中所有图形所占的面积
- r - 在 R 中使用 rvest 包抓取 soundcloud.com
- android - 如何将参数发送到 Flutter 中的深层链接?
- angular - Jest + angular-testing-library:模拟翻译服务