yagga Posted June 12, 2010 Share Posted June 12, 2010 Hello everyown! Im a newbie so please excuse me. I need a code that changes the letter "O" in the color yellow, anytime i use it. So for example if use the words "hello my name is otto" in my HTML code and i preview it in my browser, that all "O" letters are the color yellow etc. They told me that i need some PHP code because its not possible in HTML. Hope someown can help me out!.. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/204579-specific-color-for-a-letter-help/ Share on other sites More sharing options...
premiso Posted June 12, 2010 Share Posted June 12, 2010 $string = 'Hello, my name is otto!'; $string = str_replace("o", '<span style="color: yellow;">o</span>', $string); echo $string; Quote Link to comment https://forums.phpfreaks.com/topic/204579-specific-color-for-a-letter-help/#findComment-1071163 Share on other sites More sharing options...
yagga Posted June 12, 2010 Author Share Posted June 12, 2010 Thanks for the fast reply! Are all the "O" of my words yellow? not only for the string: hello my name it otto? Quote Link to comment https://forums.phpfreaks.com/topic/204579-specific-color-for-a-letter-help/#findComment-1071168 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.