Another question....Now I'm trying to use a different tag and it's acting really...err....weird....
If I use this code:
Code:
$text = eregi_replace("\[color([[:space:]]+)?=([[:space:]]+)?([[:alnum:]#]+).\]","span style=\"color: \\3;\">",$text);
It will turn this:
[color = #FF0000]
In to
span style="color: #FF000;">
However, if I add the < to the expression so it becomes:
Code:
$text = eregi_replace("\[color([[:space:]]+)?=([[:space:]]+)?([[:alnum:]#]+).\]","<span style=\"color: \\3;\">",$text);
Notice the <span in the second string now
It no longer turns the code in to what it should be and just outputs:
<span style="">
Which seems *really* weird.....and I can't figure out why it would mess with my output string like that......