Hi,
Is is possible to highlight html code, the same way as highlighting php code.
Can someone help me with this?
I have already read the php.net/highlight_string but it is not there. So any other solutions please.
Thanks
Youri
highlighting HTML code
Moderator: General Moderators
You just need to add <? at the beginning of the HTML code to highlight and ?> at the end.
Example:
Example:
Code: Select all
<?php
$thecode = show_source("http://www.myplainhtmlwebsite.com");
$highlighted = highlight_string("<?".$thecode."?>");
echo substr($highlighted, 2, -2);
?>