Jump to content

PHP Code Colour


Dysan

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.