dannybrazil Posted March 27, 2008 Share Posted March 27, 2008 i want to know how can i add things to a text when writing a php code : lets say : echo "hello im here"; how can i make it colorful and add a background etc. 10x Quote Link to comment https://forums.phpfreaks.com/topic/98197-text-mnipulating-with-php/ Share on other sites More sharing options...
MadTechie Posted March 27, 2008 Share Posted March 27, 2008 Yes/No.. Its not PHP that does it, its HTML/CSS, PHP just sends it to the browser. ie echo "hello <font color=\"#00ff00\">world</font>"; Quote Link to comment https://forums.phpfreaks.com/topic/98197-text-mnipulating-with-php/#findComment-502416 Share on other sites More sharing options...
dannybrazil Posted March 27, 2008 Author Share Posted March 27, 2008 im doing that but not getting a background around the word echo "<font bground=\"#A3A3A3\">hello</font>"; Quote Link to comment https://forums.phpfreaks.com/topic/98197-text-mnipulating-with-php/#findComment-502426 Share on other sites More sharing options...
discomatt Posted March 27, 2008 Share Posted March 27, 2008 Probably because you aren't using the correct html syntax. <span style="background: #cccccc; color: #0000ff">Some text</span> Quote Link to comment https://forums.phpfreaks.com/topic/98197-text-mnipulating-with-php/#findComment-502438 Share on other sites More sharing options...
MadTechie Posted March 27, 2008 Share Posted March 27, 2008 this is the PHP section not html,, but your need to look into span and background/style your syntax is wrong,, i tell you how but you already asked th question in the HTML/CSS section so you know its not php...! EDIT: LOL okay see discomatt post thats what you need Quote Link to comment https://forums.phpfreaks.com/topic/98197-text-mnipulating-with-php/#findComment-502440 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.