Publish PHP Code on the web – Highlight.js

It is often required to publish some code snippets in the blog on PHP or other popular languages like Python, Ruby… Here is simple way to do this..

Use nice JavaScript code formatting library. Just enter program text in <pre><code></code></pre> tags in any part of post, include CSS and library and voila:

This code should be appended into HTML:





Library itself is available through Yandex content distribution network(CDN), so no installation is needed.

Links

Thanks to Ivan Sagalaev.

1 comment

  1. remokaal1 week, 2 days ago I’m on my second order with them, first one took a month to arivre. They said something about, that they needed to ship the goods from Italy because of somekind of troubles with the customs, not really sure, I’m in the EU like they are. Complained with the bank, then things started moving. Right now it’s few days less than a month on the second batch and they haven’t shipped yet, answered an email though, at least. And I’m really wondering why I ordered a second time probably because of an EU company and I could pay the correct taxes.+2Was this answer helpful?

Leave a Reply

Your email address will not be published.