Highlight PHP Code


/ Published in: PHP
Save to your folder(s)

This function highlight_string() outputs or returns a syntax highlighted version of the given PHP code using the colors defined in the built-in syntax highlighter for PHP.


Copy this code and paste it in your HTML
  1. <?php
  2. highlight_string('<?php phpinfo(); ?>');
  3. ?>

URL: http://www.apphp.com/index.php?snippet=php-highlight-code

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.