The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> echoing the php variable in a different color
tudsy
post Nov 16 2017, 07:58 AM
Post #1


Advanced Member
****

Group: Members
Posts: 124
Joined: 30-September 14
Member No.: 21,611



Hi


Just one question. How do I echo a php variable's text from black to red?


i.e. if $fname =$_GET['FirstName'];, will echo black text. How do I echo this piece of code's text to red from black?


Any help will be appreciated.


Thanks.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Nov 16 2017, 01:38 PM
Post #2


This is My Life
*******

Group: Members
Posts: 1,437
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



You don't echo a color in PHP. It shows up black because the container text color is black. So, if the container is a <p> or <span> or whatever you need to make the text color whatever you want for the container.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

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

 



- Lo-Fi Version Time is now: 11th December 2017 - 09:38 PM