highlight_string

highlight_string

highlight_string

highlight_string
The highlight_string() function outputs a syntax

highlighted version of str using the colors defined in the built-in syntax

highlighter for PHP.

Syntax:

mixed highlight_string ( string str [, bool return])

If the second parameter return is set to TRUE then

highlight_string() will return the highlighted code as a string instead of printing it

out. If the second parameter is not set to TRUE then highlight_string() will

return TRUE on success, FALSE on failure.

Example:

echo highlight_string ( “Test String”,1);

The output is

Test String

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.