php内的输出的内容怎么换颜色
<?php$weight=$_POST["weight"];$intensity=$_POST['list'];$gender=$_POST['gender'];if($...
<?php
$weight=$_POST["weight"];
$intensity=$_POST['list'];
$gender=$_POST['gender'];
if ($gender == 1) {
$result = (879 + 10.2 * $weight) * $intensity;
echo "You daily energy intake is $result kalories";
}
else {
$result = (795 + 7.18 * $weight) * $intensity;
echo "You daily energy intake is $result kalories";
}
?>
上面是代码 需要把两行echo输出的内容换成绿色 用外联样式表能控制吗 该怎么写呢
新手一枚 谢谢了 展开
$weight=$_POST["weight"];
$intensity=$_POST['list'];
$gender=$_POST['gender'];
if ($gender == 1) {
$result = (879 + 10.2 * $weight) * $intensity;
echo "You daily energy intake is $result kalories";
}
else {
$result = (795 + 7.18 * $weight) * $intensity;
echo "You daily energy intake is $result kalories";
}
?>
上面是代码 需要把两行echo输出的内容换成绿色 用外联样式表能控制吗 该怎么写呢
新手一枚 谢谢了 展开
展开全部
echo "<font color=green>You daily energy intake is $result kalories</font>";
用这样控制颜色
用这样控制颜色
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
同意一楼哥们的答案
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询