All I want to do is capture the keyword (array, break, echo, etc) and color
it.

 

---------------

$txt = "this is an array('test')";

 

$pattern = "/(array|break|echo|continue)([\(.|\s.|\;.])/";

 

echo preg_replace($pattern, '<font color="red">$0</font>', $txt);

----------------

 

This captures "array(" though and I just want "array".

 

 

Thanks for pointing out my stupidity,

Nate Sanden

[EMAIL PROTECTED]
http://www.savingadvice.com

 

Reply via email to