highlight_code()

highlight_code($str)

Parameters:
  • $str (string) – Input string
Returns:

String with code highlighted via HTML

Return type:

string

Colorizes a string of code (PHP, HTML, etc.). Example:

$string = highlight_code($string);

The function uses PHP’s highlight_string() function, so the colors used are the ones specified in your php.ini file.

doc_CodeIgniter
2016-10-15 16:32:25
Comments
Leave a Comment

Please login to continue.