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:

1
$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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.