The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> PHP help, how to color the echo output, PHP
vin_akleh
post Feb 14 2009, 11:52 AM
Post #1


Novice
**

Group: Members
Posts: 20
Joined: 10-February 09
Member No.: 7,769



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>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 14 2009, 12:47 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Please see the FAQ entry How can I specify colors?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
vin_akleh
post Feb 14 2009, 07:18 PM
Post #3


Novice
**

Group: Members
Posts: 20
Joined: 10-February 09
Member No.: 7,769



u didnt help at all
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Feb 14 2009, 07:24 PM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



What didn't you understand about the FAQ entry I suggested?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
geoffmerritt
post Mar 7 2009, 02:16 AM
Post #5


Member
***

Group: Members
Posts: 66
Joined: 23-December 08
From: Adelaide
Member No.: 7,394



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....
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
vin_akleh
post Mar 13 2009, 10:03 PM
Post #6


Novice
**

Group: Members
Posts: 20
Joined: 10-February 09
Member No.: 7,769



that was very helpful thank u geoffmerritt
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
SteveL
post Mar 25 2009, 12:12 AM
Post #7


Newbie
*

Group: Members
Posts: 19
Joined: 25-July 07
Member No.: 3,445



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
geoffmerritt
post Mar 25 2009, 03:29 AM
Post #8


Member
***

Group: Members
Posts: 66
Joined: 23-December 08
From: Adelaide
Member No.: 7,394



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 01:46 AM