Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 11-10-2006, 01:43 PM   #1
Baseband Member
 
hatedguilt's Avatar
 
Join Date: Feb 2006
Posts: 43
Send a message via AIM to hatedguilt Send a message via Yahoo to hatedguilt
Default change font color in php?

how do you change font color in php? i tryed this:

PHP Code:
echo "\<font color\=\"red\">; 
PHP Code:
echo "hello"
PHP Code:
echo "\<\/font>; 
__________________

__________________
JustEatAtFatJoes
hatedguilt is offline   Reply With Quote
Old 11-10-2006, 04:14 PM   #2
Baseband Member
 
Join Date: Jul 2006
Posts: 53
Default Re: change font color in php?

Why do you need to do it in php? Why not just close the php tag, change the font color in html, then open the php tag back up? Seems easier, unless you have a specific reason for changing it in php.
__________________

falcon1 is offline   Reply With Quote
Old 11-10-2006, 04:32 PM   #3
Fully Optimized
 
^Mike^'s Avatar
 
Join Date: Oct 2005
Posts: 2,958
Send a message via ICQ to ^Mike^ Send a message via AIM to ^Mike^ Send a message via MSN to ^Mike^ Send a message via Yahoo to ^Mike^
Default Re: change font color in php?

Quote:
Originally Posted by falcon1
Why do you need to do it in php? Why not just close the php tag, change the font color in html, then open the php tag back up? Seems easier, unless you have a specific reason for changing it in php.
yeah that sounds good
^Mike^ is offline   Reply With Quote
Old 11-10-2006, 04:49 PM   #4
Site Team
 
root's Avatar
 
Join Date: Mar 2004
Posts: 8,007
Default Re: change font color in php?

you have escape chars where they arn't needed..
you could have had

<?php
echo "
<font color=\"red\">
";
?>

note that you dno't need the escape chars next to the triangular brackets because they have no special PHP function.
__________________
I didn’t fight my way to the top of the food chain to be a vegetarian…
Im sick of people saying 'dont waste paper'. If trees wanted to live, they'd all carry guns.
"The inherent vice of capitalism is the unequal sharing of blessings; The inherent vice of socialism is the equal sharing of miseries."
root is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 08:10 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0