You daily energy intake is $result kalories";" to replace the color."/> You daily energy intake is $result kalories";" to replace the color.">

Home  >  Article  >  Backend Development  >  How to replace color in php

How to replace color in php

藏色散人
藏色散人Original
2020-07-17 09:42:572945browse

How to replace the color in php: First open the relevant PHP file code; then use the statement "echo "You daily energy intake is $result kalories";" to replace the color.

How to replace color in php

How to change the color of the output content in php

Questions such as:

<?php
$weight=$_POST["weight"];
$intensity=$_POST[&#39;list&#39;];
$gender=$_POST[&#39;gender&#39;];
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";
}
?>

Use The following methods control color:

echo "<font color=green>You daily energy intake is $result kalories</font>";

For more related knowledge, please visit PHP Chinese website!

The above is the detailed content of How to replace color in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn