Help - Search - Members - Calendar
Full Version: PHP help, how to color the echo output
HTMLHelp Forums > Programming > Server-side Scripting
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>
Darin McGrew
Please see the FAQ entry How can I specify colors?
vin_akleh
u didnt help at all
Darin McGrew
What didn't you understand about the FAQ entry I suggested?
geoffmerritt
To make the text red...... way to easy

CODE

<?php
echo "Roses are red";
?>


CODE

<?php
echo "<font color='red'>Roses are red</font>";
?>


The above is one of a million of ways to display the text red....
vin_akleh
that was very helpful thank u geoffmerritt
SteveL
Just for the record...while geoff did provide a means of coloring text, that particular method is quite old, and the methods suggested in the FAQ are preferred. If you're having trouble understanding the info in the FAQ, I heartily recommend you study CSS a bit more closely, since you'll find that it'll make your life a hundred times easier in the future.
geoffmerritt
QUOTE(SteveL @ Mar 25 2009, 02:42 PM) *

Just for the record...while geoff did provide a means of coloring text, that particular method is quite old, and the methods suggested in the FAQ are preferred. If you're having trouble understanding the info in the FAQ, I heartily recommend you study CSS a bit more closely, since you'll find that it'll make your life a hundred times easier in the future.


SteveL

You are right it is an outdated method but it was a quick answer, and a method that I don't use myself. I much prefer creating a class and using the code for #ff0000.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.