Joomla has a plugin that highlights php, html, xml or any other 30 different types of code with different colors. But I've never liked how that was working. I needed to create in raw HTML
<pre lang="php"><?php echo "some code"; ?></pre>
But HTML editors like JCE, TinyMCE trims that attribute lang="whatever". And I needed to turn HTML editor off to edit my articled with code example, and you know what? Articles with code example most terrible for editing without HTML editor. That is why in JoomSuite Content I created code highlight easy with any editor. You have to place your code in <pre> (preformatted) tag, and you can do it either selecting style in dropdown on your editor's toolbox or switching to HTML mode. Then just at the beginning place language in curly braces.
{php}<?php
echo "123";
?>
That i it. If you want line numbers add "true" word after |
{php|true}<?php
echo "123";
?>
Here is the list of available languages
actionscript, ada, apache, asm, asp, bash, c, c_mac, caddcl, cadlisp, cdfg, cpp, csharp, css, delphi, html4strict, java, javascript, lisp, lua, mpasm, nsis, objc, oobas, oracle8, pascal, perl, php, python, qbasic, sas, smarty, vb, vbnet, visualfoxpro, xml