php如何替换颜色

php替换颜色的方法:首先打开相关PHP文件代码;然后使用语句“echo "You daily energy intake is $result kalories";”替换颜色即可。

php内的输出的内容怎么换颜色

问题如:

<?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 "<font color=green>You daily energy intake is $result kalories</font>";

更多相关知识,请访问PHP中文网!

Published by

风君子

独自遨游何稽首 揭天掀地慰生平

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注