Jump to content

[SOLVED] Color echo?


zemax

Recommended Posts

I just started learning PHP and I am trying to read form data and then display it using echo. Here is what I am using

 

echo $row["title"];

 

If I want to display it in let say red color how can I do that?

 

I have trued

 

echo "<font color="#660000">$row["title"]</font>;

 

but it gives error. Can someone please help me.

Link to comment
https://forums.phpfreaks.com/topic/71220-solved-color-echo/
Share on other sites

echo "<font color='#660000'>$row['title']</font>";

 

paste your error if this doesn't work

 

When I try this I get following error

 

PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,expecting T_STRING or T_VARIABLE or T_NUM_STRING

 

 

I am getting same error i.e.

 

PHP Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE,expecting T_STRING or T_VARIABLE or T_NUM_STRING

 

Link to comment
https://forums.phpfreaks.com/topic/71220-solved-color-echo/#findComment-358239
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.