public function parseColour($text) { $text = preg_replace("#\\[color=([^:]+):{$this->uid}\\]#", "<span style='color:\\1'>", $text); $text = str_replace("[/color:{$this->uid}]", '</span>', $text); return $text; }