Page 1 of 1
help how to color the echo output
Posted: Sat Feb 14, 2009 10:32 am
by vin_akleh
need help
how can i color the output of the following code to any color i want????
<html>
<body>
<?php
echo "Roses are red";
?>
</body>
</html>
Re: help how to color the echo output
Posted: Sat Feb 14, 2009 12:53 pm
by greyhoundcode
Little bit of CSS could do the trick
Re: help how to color the echo output
Posted: Sat Feb 14, 2009 3:24 pm
by watson516
<span style="color:#ff0000;">Roses Are Red</span>
Re: help how to color the echo output
Posted: Sat Feb 14, 2009 5:21 pm
by Still Learning
vin_akleh wrote:need help
how can i color the output of the following code to any color i want????
<html>
<body>
<?php
echo "Roses are red";
?>
</body>
</html>
You could also just use simple html inside the echo.
<?php echo "<font color=\"#FF3336\">Roses are red</font>";
Here's a link to the color codes too....
http://html-color-codes.com/
Re: help how to color the echo output
Posted: Sat Feb 14, 2009 6:24 pm
by vin_akleh
thanks for the help
Re: help how to color the echo output
Posted: Sun Feb 15, 2009 8:58 am
by socket1
Still Learning wrote:
<?php echo "<font color=\"#FF3336\">Roses are red</font>";
Or without escape quotes:
Code: Select all
<?php echo '<font color="#FF3336">Roses are red</font>'; ?>
Re: help how to color the echo output
Posted: Sun Feb 15, 2009 1:08 pm
by Still Learning
socket1 wrote:Still Learning wrote:
<?php echo "<font color=\"#FF3336\">Roses are red</font>";
Or without escape quotes:
Code: Select all
<?php echo '<font color="#FF3336">Roses are red</font>'; ?>
Cool. I help someone and I learn something new at the same time. That's nice to know.
Re: help how to color the echo output
Posted: Thu Feb 19, 2009 4:33 pm
by watson516
Still Learning wrote:socket1 wrote:Still Learning wrote:
<?php echo "<font color=\"#FF3336\">Roses are red</font>";
Or without escape quotes:
Code: Select all
<?php echo '<font color="#FF3336">Roses are red</font>'; ?>
Cool. I help someone and I learn something new at the same time. That's nice to know.
The font tag is old html.