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? Link to comment https://forums.phpfreaks.com/topic/63393-php-syntax-highlighting/ 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] Link to comment https://forums.phpfreaks.com/topic/63393-php-syntax-highlighting/#findComment-316732 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.