$this->text is a string (you use strlen($this->text) in the loop)?
It's a bit difficult to define what $this->text[$i] .= $string would mean in that case; does it mean "insert $string into $this->text following the $i'th character"? What happens to characters $i+1 onward; put them back after $string ends or drop them completely?
Making a guess as to the intent of your code, I'd say that .= isn't the operator you want here anyway, but just = instead (seeing as you use $this->text[$i] in the string you're concatenating). But even that leads to difficulties: once you've replaced the single character $this->text[$i] with the entire $string; what should $this->text[$i+1] refer to? The ($i+1)th character of the original string, or the ($i+1)th character of the new string (i.e., the 0th character of $string). The latter would be more consistent with how assignment works, but if that was how "replacing a character with a string" worked, then your code would fall immediately into an infinite loop trying to generate something that starts "[color]" followed by an infinite string of repetitions of "[color][[/color]".substr($this->text,1).
Edit: I just tried it; replacing a character by a string replaces only that character with the first character from the string. So $t="foo"; $t[1]="bar"; echo $t; yields "fbo".
function everyLetter()
{
$newstring = "";
$len = strlen($this->text);
for($i=0; $i<$len; ++$i)
{
$color = $this->colors[$i%count($this->colors)];
$newstring .= '['.$color.']'.$this->text[$i].'[/'.$color.']';
}
$this->text = $newstring;
}
Or maybe you want/have some other method for handling the case where there are more characters in the string than colours than %.