PHP: How to export HTML to DOC

When developing online projects, it is often necessary to save the HTML page as a document that can be used separately, for example, sent by e-mail, viewed and edited offline. A convenient way is to export the HTML page to one of the most commonly used text formats – doc.

The free open-source PHP-module “html_to_doc” can be used to export the HTML page to the DOC document. It can convert the HTML to the DOC document, which will be correctly processed by the text editor MS Word. If the HTML page includes images, they will be embedded in the DOC document.

The PHP module can be downloaded from https://github.com/Korchy/html_to_doc

Continue reading “PHP: How to export HTML to DOC”

PHP: How to get the full class name with static inheritance

PHP supports the Late Static Bindings mechanism. The full class name with static inheritance we can get by calling the function:

Example:

 

How to check code execution time in PHP

To check how match time code execution takes you need to frame checking code with following instructions:

This example result:

Executed for: 8.9997079372406 sek.

WordPress TinyMCE Advanced Editor plugin – setting start value for numeric list

Little external plugin for Wordpress TinyMCE Advanced Editor. Adds new button to the editor menu to set start values of numeric lists.

Appends “start” attribute to “OL” tag.

Plugin usage example
Plugin usage example

Continue reading “WordPress TinyMCE Advanced Editor plugin – setting start value for numeric list”