Home > Backend Development > PHP Problem > How to replace color in php

How to replace color in php

藏色散人
Release: 2023-03-02 16:04:02
Original
3030 people have browsed it

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";
}
?>
Copy after login

Use The following methods control color:

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

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!

Related labels:
php
Statement of this Website
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template