I think you did not understand me, I explain:
I wrote a chat program , I want when a user sends a message the message appears with mixed colors... the color of the first letter=green , the 2nd letter=red , the 3rd letter=blue and start over the 4th letter=green ,the 5th letter=red the 6th letter=blue and start over the 7th letter=green, 8th letter=red , 9th letter=blue .... until the message's end.
nevermind about the customizing. i made it into a function. lets say you have words contained in the variable $string, all you would have to do is call the function "color()" with the string that needs to be colored inside the parathesis ex. "color($string)" and the colored text will echoed onto the page.