highlighted_string And highlighted_file

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


Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.