highlighted_string And highlighted_file
highlighted_string And highlighted_file:
These functions gives syntax higlighted version of string and syntax higlighted version of the code of a file respectively.
Syntax:
mixed highlight_string ( string str [, bool return])
mixed highlight_file ( string filename [, bool return])
Example:
<?php
$str=”This is Highlighted String”;
echo $str.”<br>”;
highlight_string ($str);
echo “<br>”;
highlight_file (’highlight.txt’);
?>
Output:
Normal : This is Highlighted String
Highlighted :
This is Highlighted String
/**************** highlight.txt*********************/
1.test
2.test
3.test
4.test
5.test
6.test
7.test
8.test
9.test
