Im trying to find a way to replace a whole line that starts with // and add color to it
like
// this is an example
the above text should be in red, there will be more text also but I just want to filter the text that is behind a // to a diffrent color.
right now I have code looking for certain text then changing them to diffrent colors...
$code = ereg_replace("then", "<span class=code>Then</span>", $code);
but I need to find out how to change the color of a whole line