ChadNomad Posted May 31, 2008 Share Posted May 31, 2008 I've been using this to highlight PHP code: $newcontent = preg_replace('/\[command\](.*?)\[\/command\]/ie', 'highlight_string(\'$1\', TRUE)', nl2br($page_information[content])); The only problem is it doesn't work on content that has multiple lines. Confused... Also, another question, how would I wrap a html div block around the highlight_string function? Any help appreciated. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.