Dysan Posted March 31, 2008 Share Posted March 31, 2008 Hi, I want to create a script that formats different parts of the code into different colours. - How do I do this? Also, how do I know what standard colours to use, e.g. Red = Strings etc.) Link to comment https://forums.phpfreaks.com/topic/98817-php-code-colour/ Share on other sites More sharing options...
obsidian Posted March 31, 2008 Share Posted March 31, 2008 Hi, I want to create a script that formats different parts of the code into different colours. - How do I do this? Also, how do I know what standard colours to use, e.g. Red = Strings etc.) There is already a function that does this. Read up on highlight_string() and highlight_file(). <?php $string = "<?php echo 'Hello, world!'; ?>"; highlight_string($string); ?> Link to comment https://forums.phpfreaks.com/topic/98817-php-code-colour/#findComment-505640 Share on other sites More sharing options...
kenrbnsn Posted March 31, 2008 Share Posted March 31, 2008 You would want to use CSS to do this. If you post what you have now, we could help you. Ken Link to comment https://forums.phpfreaks.com/topic/98817-php-code-colour/#findComment-505642 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.