marcus Posted August 5, 2007 Share Posted August 5, 2007 How would I do so: [code=php:0]code [/code] Highlights the code inside of the tags? Quote Link to comment Share on other sites More sharing options...
effigy Posted August 6, 2007 Share Posted August 6, 2007 <pre> <?php $string = '[code=php:0]<?php echo "test"; ?> '; echo preg_replace('#\ [php\](.*?)\[/php\]#se', 'highlight_string("\1", TRUE)', $string); ?> </pre> [/code] 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.