hi all,
as my title says, i'm facing a problem with preg_replace. The thing i'm working on is a simple phpbb mod (really simple): i want to change the color and the weight of certain words.
here's the sample i'm entering in the post field:
Quote:
class hello
Hello extends Hi
public abstract class Hello
public abstract class Hello extends Hi
public interface Hello
|
the output i want to get is this:
Quote:
class hello
Hello extends Hi
public abstract class Hello
public abstract class Hello extends Hi
public interface Hello
|
this is the code i'm using to do so:
don't mind the $uid, it is set, and works fine. Now, my problem is that it all works except for the "extends" word: it just don't change to green, italic. My output looks like this:
Quote:
class hello
Hello extends Hi
public abstract class Hello
public abstract class Hello extends Hi
public interface Hello
|
when i display the $text var during the for loop, together with the $replace[$i] var, it says that "extends" is placed before the change of color code, like this:
anyone knows how to fix this?
thanx in advance,
UnrealEd