Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Server-side Scripting _ echoing the php variable in a different color

Posted by: tudsy Nov 16 2017, 07:58 AM


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.


Posted by: CharlesEF Nov 16 2017, 01:38 PM

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.

Powered by Invision Power Board (
© Invision Power Services (