php - 如何让度数符号显示在我的表中
问题描述
我必须为我的 F 和 C 在我的表中添加一个度数符号,我首先尝试做 $Celsius$deg 但是当我使用这个函数时,我的页面上出现语法错误,我是 php 新手,我从未合并以前在我的表中的度数符号,任何帮助将不胜感激。
(我会注意到我已经有了代码和表格,但是,我只是想让符号显示在我的表格中)
<table align="center" border="1" width="30%">
<thead>
<td>Celsius</td>
<td>Fahrenheit</td>
</thead>
<?php
$celsius = 100;
while ($celsius >= -40) {
$fahrenheit = ($celsius * 9.0/5.0) + 32;
print "<tr><td>$celsius</td><td>$fahrenheit</td></tr>";
$celsius -= 10;
$fahrenheit -= 10;
}
?>
</table>
解决方案
推荐阅读
- angular - 我希望在 Angular2 中显示文本
- apache-spark - Dataproc Spark 在访问 Hive 时返回 java.lang.UnsatisfiedLinkError: org.xerial.snappy.SnappyNative.uncompressedLength(Ljava/nio/ByteBuffer;II)
- node.js - Timeuuid 的 Cassandra 数据库导入问题
- mysql - 如何将值插入到 Node express 项目中的 Mysql.js 表中
- r - R-在日期字段上创建一个新字段应用条件
- c# - awaitng 异步事件处理程序不等待方法继续
- ios - 核心数据,关系 - 将多个选定的行存储到实体
- c++ - 使用#define 声明函数
- asp.net-core-mvc - 文化不一致 - 剃刀视图和视图模型之间的模型绑定中忽略了小数点分隔符
- firebase - @firebase/数据库警告