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! 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; 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? 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
Archived
This topic is now archived and is closed to further replies.